Skip to content

docs(web): SEO metadata — sitemap coverage, per-page descriptions, canonical, OG images - #59

Merged
ExorTek merged 4 commits into
masterfrom
docs/web-seo-metadata
Sep 10, 2026
Merged

ExorTek merged 4 commits into
masterfrom
docs/web-seo-metadata

Conversation

@ExorTek

@ExorTek ExorTek commented Sep 10, 2026

Copy link
Copy Markdown
Owner

Summary

SEO pass on the auth.memet.dev docs 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

  • Sitemap coverage — web/app/sitemap.js now derives routes from the Nextra page map instead of a hand-kept list that had drifted. auth, oauth2, oidc, paseto and all sub-pages were missing; the sitemap now emits all 160 pages and stays correct as pages are added. Priority scales with route depth.
  • Per-page meta descriptions — only 14/160 pages had a 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.
  • Canonical per page (bug fix) — the layout's 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). generateMetadata now resolves canonical and og:url to each page's own path.
  • Dynamic OG images — new /og endpoint renders a 1200×630 branded share card from title/desc (ImageResponse); pages seed it per-page. Previously no image was served despite the summary_large_image card. Also re-declares the OG siteName/type/locale the page-level override would otherwise drop, and adds a generated apple-icon.

Verification

  • yarn web:build passes; build manifest lists /og (dynamic), /sitemap.xml, /robots.txt, /apple-icon; Pagefind indexes 160 pages.
  • curl checks confirmed: sitemap includes the previously-missing sections (160 <loc>), each page renders its own <meta name="description">, canonical + og:url are per-page, /og returns 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 since web/ is touched.

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.
Copilot AI lite review requested due to automatic review settings September 10, 2026 22:45

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@ExorTek
ExorTek merged commit b64168e into master Sep 10, 2026
1 check passed
@ExorTek
ExorTek deleted the docs/web-seo-metadata branch September 10, 2026 22:47
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.

2 participants