Skip to content

feat(registry): French i18n parity + per-component SEO MDX + SEO maximization#478

Open
bntvllnt wants to merge 7 commits into
mainfrom
feat/component-seo-mdx
Open

feat(registry): French i18n parity + per-component SEO MDX + SEO maximization#478
bntvllnt wants to merge 7 commits into
mainfrom
feat/component-seo-mdx

Conversation

@bntvllnt

@bntvllnt bntvllnt commented Jul 3, 2026

Copy link
Copy Markdown
Collaborator

Closes #475
Closes #477

Consolidated PR (was stacked on #476; retargeted to main so full CI runs and it
merges in one action — #476 is superseded by this PR and can be closed).

Three cohesive bodies of work, each reviewed and verified:

1. Full French (fr) i18n parity

next-intl wiring across every route + shared component; docs migrated to per-locale
MDX; messages/{en,fr}.json at parity; localized Link (no locale leak); drift
guard scripts/check-i18n.ts (i18n:check); e2e/i18n.spec.ts.

2. Per-component SEO MDX

content/components/<slug>/{en,fr}.mdx (626 files) rendered server-side via
MDXContent (crawlable prose + hydrated <Preview>/<Install>/<Code>/<Stories>
kit); SEO frontmatter; generator + components:verify-mdx build gate.

3. SEO maximization

Component JSON-LD (TechArticle + SoftwareSourceCode + BreadcrumbList, enriched with
image/inLanguage/keywords/dateModified, localized URLs); home SoftwareApplication;
favicon + apple-icon + manifest icons + theme-color; sitemap fixes; playground
canonical→parent; "Related components" internal linking; single H1 per page.

Review fixes applied

  • component header (h1/subtitle/breadcrumb/share/OG) now localized from MDX frontmatter
  • ToC anchors fixed (kit blocks carry ids); /themes + /docs metadata/list localized

Verification

tsc clean · eslint clean · i18n:check green · components:verify-mdx green (313×2) ·
next build 0 errors (1680 static pages) · E2E 49/49 · Lighthouse A11y 100 / BP 96 /
SEO 92 (localhost-canonical artifact; ~100 on prod) · web vitals LCP 56-320ms, CLS 0.

Note

French copy is diacritic-stripped throughout — matches the repo's pre-existing house
style (documented in AGENTS.md). Flag if you'd prefer accented French (a separate,
sitewide change incl. the pre-existing catalog).

https://claude.ai/code/session_018ktYZpgFmQbM2GrXF8GyBv

bntvllnt added 4 commits July 2, 2026 22:50
Rebased onto main and integrated with the new per-family landing pages (#464)
and typography primitives (#465). Takes the registry from ~10% localized to
full French parity, drift-guarded and E2E-verified.

- next-intl wiring across every route + shared component (home/footer/forms/
  header/landing, docs, philosophy, report/request, vs/*, releases, changelog,
  templates, themes + editor, design, build, components, families) — localized
  Link everywhere (no locale leak)
- docs migrated to per-locale folders <slug>/{en,fr}.mdx with French translations
- messages/{en,fr}.json: pages.*/shared.*/families.* namespaces, en/fr key-identical
- new families landing pages localized; ComponentCard story-count localized;
  /ai now redirects to /families/ai so pages.ai retired
- scripts/check-i18n.ts (`i18n:check`): message parity + MDX coverage + dead-namespace guard
- e2e/i18n.spec.ts: every route x both locales, switcher, hreflang, real-French, fallback
- llms-full.txt reads pages via the folder-aware loader
- AGENTS.md: i18n architecture, gate, add-a-language recipe

Data left English by design: component/family descriptions, family FAQ, design-guide
body, demo-fixture previews, some SEO metadata/JSON-LD.

Gates: i18n:check green, tsc clean, next build 0 errors, eslint clean, E2E 45/45.

Closes #475
…ded sweep)

A stricter multi-line + single-word-aware scan caught chrome an earlier pass
missed (single-word button labels like "Copied!"/"Share"):
- quick-add: Copy install command / Copied! / Add to v0.dev -> shared.quickAdd.*
- share-embed-bar: Share/Embed/Copy link/Link copied!/embed dialog title+desc/
  Copy embed code/share dialog title+desc -> shared.shareEmbed.* (platform names
  X/LinkedIn/Reddit/... kept as brands)
- e2e: add /components/button (exercises these + storybook-embed) + /families routes

Remaining hardcoded strings are intentional: demo-fixture previews, registry/
family data, SEO metadata + JSON-LD, brand names, literal paths, and the RSS
<link> title (feed is English).

i18n:check green, tsc clean, eslint clean, next build 0 errors, E2E 47/47.
Each component page becomes unique, localized, crawlable MDX that embeds the
live kit — not a thin auto-generated shell — for maximum SEO.

- lib/component-content.ts: loads content/components/<slug>/<locale>.mdx (en fallback)
- components/component-mdx: kit bound to page data (<Preview>/<Install>/<Code>/<Stories>)
- components/[slug]/page.tsx: renders the MDX via MDXContent (server-evaluated →
  crawlable prose + hydrated preview); SEO metadata (title/description/keywords)
  from MDX frontmatter; data-driven body kept as fallback
- scripts/generate-component-mdx.ts (components:generate-mdx): scaffolds baseline
  en.mdx for all 313 from metadata (skips hand-authored)
- scripts/verify-component-mdx.ts (components:verify-mdx): every component has
  en+fr with frontmatter title/description and a required <Preview> block
- e2e/component-mdx.spec.ts: proves button renders authored prose + live preview,
  fr renders French (zero English) — 2/2 pass
- content/components/*/en.mdx: 313 English pages; button hand-authored en+fr pilot

Next: French fr.mdx for the remaining 312 (verifier enforces coverage).

tsc clean, eslint clean, next build 0 errors, pilot E2E 2/2.
- 312 fr.mdx generated from French-translated descriptions (diacritic-stripped
  house style) + fixed French template; button hand-authored. All 313 components
  now have en+fr SEO pages.
- build gate: `pnpm build` now runs i18n:check + components:verify-mdx before
  next build, so missing locales / missing <Preview> blocks fail CI.

components:verify-mdx green (313 x 2, frontmatter + <Preview>), next build 0
errors, E2E: authored (button) + generated (accordion) render localized prose +
live preview.
@vllnt-pilot

vllnt-pilot Bot commented Jul 3, 2026

Copy link
Copy Markdown

ntk preview

App Status Preview
ui-registry Ready https://pr-478-ui-registry.preview.vllnt.ai
storybook Skipped (preview cell not configured)

Built from b63e48cb · public + no-index (ADR-082) · torn down on close

…map, linking)

Deep SEO review (3 audit dimensions + Lighthouse + web-vitals via agent-browser).
Vitals are excellent (LCP 56-320ms, CLS 0, TTFB <14ms). Fixes:

JSON-LD (answering "jsonld in component pages?"):
- component pages now emit TechArticle + SoftwareSourceCode + BreadcrumbList,
  enriched with image (per-page OG), inLanguage, keywords (frontmatter),
  dateModified, mainEntityOfPage
- all JSON-LD URLs + breadcrumb names localized (was advertising English URLs on /fr)
- home page: SoftwareApplication node (product entity)

On-page:
- duplicate H1 fixed — stripped `# Title` from all 626 component MDX (page header
  is the sole h1; MDXContent rendered `#` as a 2nd h1); generator updated
- "Related components" section (family siblings) — real in-content internal linking

Technical SEO:
- favicon (app/icon.svg) + apple-touch-icon (ImageResponse) + manifest icons +
  theme-color viewport (were all missing → blank SERP favicon)
- sitemap: add /themes + /vs, drop the /docs/changelog redirect
- playground pages canonicalize to the parent component (kill 626 dup pages)

Verified: h1=1, enriched LD + localized /fr URLs + icons all present in built HTML;
tsc/eslint/i18n:check/components:verify-mdx green; next build 0 errors.
@bntvllnt bntvllnt self-assigned this Jul 4, 2026
… anchors

Code review found merge-blockers (high blast radius, both locales):
- component page h1/subtitle/breadcrumb/share/OG-image used English
  meta/aiSeo instead of the localized MDX frontmatter → /fr pages showed an
  English header above French prose. Now use articleTitle/articleDescription.
- ToC "On This Page" anchors (installation/code/storybook) were dead — the MDX
  kit blocks had no ids. Added scroll-mt ids (preview/installation/code/
  storybook) + localized ToC titles + a "related" entry, ordered to match render.
- /themes generateMetadata was hardcoded English → pages.themes.metaTitle/
  metaDescription, wired like every other page.
- /docs index cards rendered English DOCS_PAGES titles/descriptions → now read
  each doc's localized MDX frontmatter.
- verify-mdx now requires <Install>/<Code>/<Stories> blocks too, not just <Preview>.

Verified in built HTML: /fr subtitle + /fr/docs cards + /fr/themes title are
French; all ToC anchor ids present. tsc/eslint/i18n:check/verify-mdx green,
next build 0 errors.
@bntvllnt bntvllnt changed the base branch from worktree-i18n-parity to main July 7, 2026 14:06
@bntvllnt bntvllnt changed the title feat(registry): per-component SEO MDX — bespoke localized component pages feat(registry): French i18n parity + per-component SEO MDX + SEO maximization Jul 7, 2026
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.

Per-component SEO MDX: bespoke, localized component pages Full French (fr) i18n parity across the registry site

1 participant