Skip to content

Commit

Permalink
feat(search): index page slug
Browse files Browse the repository at this point in the history
  • Loading branch information
RobsonOlv committed Mar 22, 2024
1 parent d94fc44 commit f2a9965
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/components/tutorial-markdown-render/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ const TutorialMarkdownRender = (props: Props) => {
<>
<Head>
<title>{props.serialized.frontmatter?.title as string}</title>
<meta name="docsearch:slug" content={props.slug} />
<meta name="docsearch:doctype" content="Tutorials & Solutions" />
{props.serialized.frontmatter?.hidden && (
<meta name="robots" content="noindex" />
Expand Down
1 change: 1 addition & 0 deletions src/pages/announcements/[slug].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ const AnnouncementPage: NextPage<Props> = ({
<Head>
<title>{serialized.frontmatter?.title as string}</title>
<meta name="docsearch:doctype" content="announcements" />
<meta name="docsearch:slug" content={slug} />
</Head>
<DocumentContextProvider headings={headings}>
<Flex sx={styles.innerContainer}>
Expand Down
1 change: 1 addition & 0 deletions src/pages/docs/tracks/[slug].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ const TrackPage: NextPage<Props> = ({
<Head>
<title>{serialized.frontmatter?.title as string}</title>
<meta name="docsearch:doctype" content="tracks" />
<meta name="docsearch:slug" content={slug} />
{serialized.frontmatter?.hidden && (
<meta name="robots" content="noindex" />
)}
Expand Down
3 changes: 3 additions & 0 deletions src/pages/faq/[slug].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ import DateText from 'components/date-text'
const docsPathsGLOBAL = await getFaqPaths('faq')

interface Props {
slug: string
sectionSelected: string
breadcrumbList: { slug: string; name: string; type: string }[]
content: string
Expand All @@ -56,6 +57,7 @@ interface Props {
const FaqPage: NextPage<Props> = ({
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
//@ts-ignore
slug,
serialized,
headingList,
contributors,
Expand Down Expand Up @@ -85,6 +87,7 @@ const FaqPage: NextPage<Props> = ({
<Head>
<title>{serialized.frontmatter?.title as string}</title>
<meta name="docsearch:doctype" content="Start here" />
<meta name="docsearch:slug" content={slug} />
{serialized.frontmatter?.hidden && (
<meta name="robots" content="noindex" />
)}
Expand Down
3 changes: 3 additions & 0 deletions src/pages/known-issues/[slug].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ import DateText from 'components/date-text'
const docsPathsGLOBAL = await getKnownIssuesPaths('known-issues')

interface Props {
slug: string
sectionSelected: string
breadcrumbList: { slug: string; name: string; type: string }[]
content: string
Expand All @@ -57,6 +58,7 @@ interface Props {
const KnownIssuePage: NextPage<Props> = ({
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
//@ts-ignore
slug,
serialized,
headingList,
contributors,
Expand Down Expand Up @@ -86,6 +88,7 @@ const KnownIssuePage: NextPage<Props> = ({
<Head>
<title>{serialized.frontmatter?.title as string}</title>
<meta name="docsearch:doctype" content="Start here" />
<meta name="docsearch:slug" content={slug} />
{serialized.frontmatter?.hidden && (
<meta name="robots" content="noindex" />
)}
Expand Down

0 comments on commit f2a9965

Please sign in to comment.