Skip to content

Canonicalize docs to www.kernel.sh and exclude repo docs from the site - #712

Open
masnwilliams wants to merge 5 commits into
mainfrom
hypeship/docs-www-canonical-mintignore
Open

masnwilliams wants to merge 5 commits into
mainfrom
hypeship/docs-www-canonical-mintignore

Conversation

@masnwilliams

@masnwilliams masnwilliams commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

summary

  • canonical: production docs pages emit canonicals on the non-www host (https://kernel.sh/docs/...), which 301s to www. This sets seo.metatags.canonical to https://www.kernel.sh/docs. Mintlify appends each page's path to that base, the same setup Mintlify's own /docs subpath site uses (https://www.mintlify.com/docs).
  • .mintignore: seo.indexing: "all" publishes files that aren't in the navigation, so AGENTS.md, CODE_OF_CONDUCT.md, and .docs/code-example-guide.md were live pages in the docs sitemap. They're now excluded from the build. The files stay in the repo for contributors and agents; indexing: "all" is unchanged.
  • redirect: /browsers/scaling/pools → /browsers/pools. Two marketing-site posts link to the old path, which now 404s.
  • landing description: index.mdx had description: "", so the docs landing page had no meta description. Mintlify renders the frontmatter description as a subtitle under the title, and none of its config-level options can scope a description to only the root page: seo.paths takes folders only, and a global seo.metatags.description would land on the ~90 pages without their own. So the description goes in frontmatter, and style.css hides its subtitle on the landing page only (html[data-current-path="/"] #header > div.prose). Mintlify keeps data-current-path in sync across client-side navigation, so other pages' subtitles are unaffected, and the landing page's layout matches production pixel for pixel.

verification

  • mint broken-links (the CLI version CI pins, 4.2.930) reports no broken links.
  • on the preview, the landing page has <meta name="description"> and og:description, shows no subtitle, and its title and body positions match production at 1440 and 390. Canonicals render as https://www.kernel.sh/docs/src/_props/<path>; Mintlify documents /src/_props as a local-only artifact, so production should emit https://www.kernel.sh/docs/<path>. /AGENTS, /CODE_OF_CONDUCT, and /.docs/code-example-guide return 404.
  • after deploy, check a page's canonical and /docs/sitemap.xml. If the sitemap still lists https://kernel.sh/docs/..., the custom domain in the Mintlify dashboard needs to change from kernel.sh to www.kernel.sh (keeping host at /docs).

@mintlify

mintlify Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated
Kernel 🟢 Ready View Preview Oct 21, 2026, 8:07 PM

💡 Tip: Enable Automations to automatically generate PRs for you.

This branch was successfully deployed

1 active deployment
staging — e4f1f5e4 Deployed Oct 21, 2026 by mintlify[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant