Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/algolia index #27

Merged
merged 2 commits into from
Feb 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions algolia/scraper_md.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
{
"index_name": "helpcenter-docs",
"start_urls": ["https://helpcenter.vtex.com/docs"],
"start_urls": ["https://leafy-mooncake-7c2e5e.netlify.app//docs"],
"stop_urls": [],
"sitemap_urls": ["https://helpcenter.vtex.com/sitemap-0.xml"],
"sitemap_urls": [
"https://leafy-mooncake-7c2e5e.netlify.app/server-sitemap.xml"
],
"sitemap_alternate_links": true,
"selectors": {
"lvl0": "article .title, article h1",
"lvl1": "article h2",
Expand All @@ -13,7 +16,7 @@
},
"custom_settings": {
"separatorsToIndex": "_",
"attributesForFaceting": ["doctype"],
"attributesForFaceting": ["doctype", "language"],
"attributesToRetrieve": [
"hierarchy",
"content",
Expand Down
4 changes: 4 additions & 0 deletions src/pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ function MyApp({ Component, pageProps }: Props) {
property="og:image"
content="https://cdn.jsdelivr.net/gh/vtexdocs/devportal@main/public/images/meta-image.png"
/>
<meta
property="docsearch:language"
content={pageProps.locale || currentLocale}
/>
</Head>
<PreviewContextProvider>
<Layout
Expand Down
3 changes: 2 additions & 1 deletion src/pages/docs/tracks/[slug].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ const TrackPage: NextPage<Props> = ({
<>
<Head>
<title>{serialized.frontmatter?.title as string}</title>
<meta name="docsearch:doctype" content="Start here" />
<meta name="docsearch:doctype" content="tracks" />
{serialized.frontmatter?.hidden && (
<meta name="robots" content="noindex" />
)}
Expand Down Expand Up @@ -468,6 +468,7 @@ export const getStaticProps: GetStaticProps = async ({
isListed,
breadcrumbList,
branch,
locale,
},
revalidate: 600,
}
Expand Down
3 changes: 2 additions & 1 deletion src/pages/docs/tutorial/[slug].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ const TutorialPage: NextPage<Props> = ({
<>
<Head>
<title>{serialized.frontmatter?.title as string}</title>
<meta name="docsearch:doctype" content="Tutorials & Solutions" />
<meta name="docsearch:doctype" content="tutorials" />
{serialized.frontmatter?.hidden && (
<meta name="robots" content="noindex" />
)}
Expand Down Expand Up @@ -435,6 +435,7 @@ export const getStaticProps: GetStaticProps = async ({
isListed,
breadcrumbList,
branch,
locale,
},
revalidate: 600,
}
Expand Down
3 changes: 2 additions & 1 deletion src/pages/updates/announcements/[slug].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ const NewsPage: NextPage<Props> = ({ serialized, branch }) => {
<>
<Head>
<title>{serialized.frontmatter?.title as string}</title>
<meta name="docsearch:doctype" content="News" />
<meta name="docsearch:doctype" content="announcements" />
</Head>
<DocumentContextProvider headings={headings}>
<Flex sx={styles.innerContainer}>
Expand Down Expand Up @@ -227,6 +227,7 @@ export const getStaticProps: GetStaticProps = async ({
sidebarfallback,
sectionSelected,
branch,
locale,
},
revalidate: 600,
}
Expand Down
Loading