docs: generate sitemaps + change search filters (#8957)

- Generate sitemaps for `book` and `resources` projects (in attempt to resolve some pages not being picked up by the crawler)
- Change the v2 search filters

> Note: will require changes to algolia's crawler + a recrawl once merged
This commit is contained in:
Shahed Nasser
2024-09-03 13:33:08 +03:00
committed by GitHub
parent 8e177538c1
commit f9b0605d67
8 changed files with 76 additions and 7 deletions

View File

@@ -0,0 +1,13 @@
import { retrieveMdxPages } from "build-scripts"
import type { MetadataRoute } from "next"
import path from "path"
import { config } from "../config"
import { basePathUrl } from "../utils/base-path-url"
export default function sitemap(): MetadataRoute.Sitemap {
return retrieveMdxPages({
basePath: path.resolve("app"),
}).map((filePath) => ({
url: `${config.baseUrl}${basePathUrl(filePath)}`,
}))
}

View File

@@ -63,7 +63,7 @@ const SearchProvider = ({ children }: SearchProviderProps) => {
},
},
]}
initialDefaultFilters={["resources"]}
initialDefaultFilters={["guides"]}
>
{children}
</UiSearchProvider>