SEO, redirects, and errors
Meta tags#
seo.metatags adds meta tags to every page. Keys with an og:-style prefix become property attributes; everything else becomes a name attribute.
{
"seo": { "metatags": { "og:image": "/images/social.png" } }
}Indexing#
{
"seo": { "indexing": "navigable" }
}"navigable"(default) — pages markedhiddenin navigation get anoindextag and stay out ofsitemap.xml"all"— every page is indexable
A per-page noindex frontmatter field always wins.
Sitemap#
When the production site URL is set, pnpm build writes a sitemap.xml covering every indexable page, with last-modified dates taken from git history.
Redirects#
The redirects key maps moved or renamed pages to their new locations. Each source becomes a static redirect page in the build output, and client-side routing follows the same rules for unknown paths.
{
"redirects": [
{ "source": "/docs/old-page", "destination": "/docs/new-page" },
{ "source": "/docs/legacy", "destination": "https://example.com/archive" }
]
}Sources are matched exactly. Wildcard patterns are not supported; add an exact entry for each source path.
404 page#
The errors.404 key controls what happens when a page is not found:
{
"errors": {
"404": {
"redirect": false,
"title": "Page not found",
"description": "Try the documentation home instead."
}
}
}By default (redirect: true) unknown paths navigate to the docs home. Set redirect to false to show the 404 page with an optional custom title and description.
Last-modified timestamps#
Set metadata.timestamp to show a "Last updated" date on every page, taken from each file's git history at build time:
{
"metadata": { "timestamp": true }
}Override it per page with the timestamp frontmatter field. Pages with timestamps also emit an article:modified_time meta tag.
Back to Configuration overview.