docs(web): SEO metadata — sitemap coverage, per-page descriptions, canonical, OG images - #59
Merged
Merged
Conversation
The hand-kept ROUTES array had drifted several sections behind the content tree — auth, oauth2, oidc, paseto and their sub-pages were absent from the sitemap. Walk getPageMap() instead so every routable page is included and the sitemap stays correct as pages are added. Priority now scales with route depth.
Only 14 of 160 pages carried a description; every package overview fell back to the site-wide default, giving 20+ pages the same SERP snippet and OG description. Add a distinct, RFC-anchored description to each of the 20 package overview pages and the compliance mapping.
/og renders a 1200x630 branded share card from title/desc query params (ImageResponse); pages seed it per-page so each share preview is specific. Social shares previously rendered with no image despite the summary_large_image Twitter card. Also add a generated apple-icon.
The root layout's alternates.canonical: '/' was inherited by every page, so all doc pages emitted a canonical pointing at the homepage — telling search engines to treat them as duplicates. Resolve canonical (and og:url) to each page's own path in generateMetadata, and wire the per-page /og share image while re-declaring the OG siteName/type/locale the page-level override would otherwise drop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
SEO pass on the
auth.memet.devdocs site (web/). The base was already solid (metadataBase, robots, keywords, Twitter card, Pagefind), but exploration surfaced three real gaps plus a severe canonical bug found while wiring OG.Changes
web/app/sitemap.jsnow derives routes from the Nextra page map instead of a hand-kept list that had drifted.auth,oauth2,oidc,pasetoand all sub-pages were missing; the sitemap now emits all 160 pages and stays correct as pages are added. Priority scales with route depth.description; every package overview fell back to the site-wide default (same SERP snippet + OG description across 20+ pages). Added a distinct, RFC-anchored description to each of the 20 package overviews and the compliance page.alternates.canonical: '/'was inherited by every page, so all doc pages canonicalized to the homepage (search engines treat them as duplicates → sub-pages not indexed).generateMetadatanow resolves canonical andog:urlto each page's own path./ogendpoint renders a 1200×630 branded share card fromtitle/desc(ImageResponse); pages seed it per-page. Previously no image was served despite thesummary_large_imagecard. Also re-declares the OGsiteName/type/localethe page-level override would otherwise drop, and adds a generatedapple-icon.Verification
yarn web:buildpasses; build manifest lists/og(dynamic),/sitemap.xml,/robots.txt,/apple-icon; Pagefind indexes 160 pages.curlchecks confirmed: sitemap includes the previously-missing sections (160<loc>), each page renders its own<meta name="description">, canonical +og:urlare per-page,/ogreturns a 1200×630 PNG, apple-icon returns 180×180.Scope is
web/only (private docs workspace) — no published package changed, so no changeset. Netlify's ignore rule will build this sinceweb/is touched.