Repository navigation
Feat/1feat(seo): expand route-specific OG metadata62 route specific og - #167
Conversation
|
@Peolite1 is attempting to deploy a commit to the truthixify's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
@Adedoyinjr Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
|
Please rebase onto |
Introduce a robust system for generating Open Graph metadata and social sharing images for all routes, including dynamic blog posts and case studies. - Add `scripts/gen-blog-manifest.mjs` to automatically generate a JSON manifest from MDX frontmatter during build. - Implement `src/utils/og-metadata.ts` to centralize route metadata resolution, including support for localized titles and descriptions. - Update `middleware.ts` to dynamically inject SEO meta tags into HTML responses for bots. - Enhance `scripts/og.ts` to support dynamic routes from the blog manifest and case studies data. - Add unit tests for middleware and metadata utility functions. - Update build pipeline in `package.json` to include manifest generation.
02750cf to
a499437
Compare
|
The scope and locale slugs are fixed, but Spanish images are still rendered from the same English route config. Only the filename gets the Spanish prefix. Spanish descriptions and OG URLs also use English copy and paths. Please render localized image content, keep localized URLs, and test the generated metadata. |
|
The latest push adds Portuguese strings, but the resolver still supports only en and es. Spanish descriptions and OG URLs also remain English. Please support Portuguese end to end and preserve the locale in descriptions, URLs, and generated images. |
1 similar comment
|
The latest push adds Portuguese strings, but the resolver still supports only en and es. Spanish descriptions and OG URLs also remain English. Please support Portuguese end to end and preserve the locale in descriptions, URLs, and generated images. |
Add an ogRoutes namespace to en/es/pt holding per-route title, description and OG image copy, and drive both the metadata resolver and the satori generator from that single source. - support pt end to end: Locale, SUPPORTED_LOCALES, prefix stripping, slugs - preserve the locale in descriptions, og:url (/pt/grants) and images (pt-*.png) - render localized copy into es-/pt- images instead of re-rendering English - emit og:locale pt_BR and rewrite the html lang attribute for pt
Support Portuguese end to end and preserve the locale in descriptions, URLs and generated images. The og.routes table only carried OG image copy and was wired for es alone, so pt strings were never read, descriptions and og:url stayed English, and the es images were re-rendered from the English config. Replace it with an ogRoutes namespace holding title, description and image copy for every route in en/es/pt, read by both the metadata resolver and the satori generator. - Locale/SUPPORTED_LOCALES cover pt; locale prefix stripping, image slugs, og:locale tags and the html lang rewrite follow any supported locale - og:url keeps the locale prefix (/pt/grants) while English stays unprefixed - images are generated from listOgImageJobs(), so es-*/pt-* carry translated text instead of a localized filename over English copy
|
Locale handling is fixed, but indexable routes such as /chains, /ecosystem, /security, /status, /governance, /threat-model, and /use-cases/calculator are still missing. Unknown blog and case-study slugs are also treated as indexable. Please cover those routes and reject missing slugs. |
- add /chains, /ecosystem, /security, /status, /governance, /threat-model and /use-cases/calculator to ogRoutes in en, es and pt, with matching ROUTE_SLUGS entries so each gets a prerendered image - resolve static routes by exact path first so /use-cases/calculator no longer inherits the /use-cases card - isIndexableRoute and resolveRouteMetadata now require the blog manifest or case-studies entry to exist, so unknown slugs and /blog/tag/*, /blog/author/* are no longer treated as indexable and receive no metadata - extend the og-metadata and middleware suites over the new routes, their localized variants, and the rejected slugs
|
Addressed in 1868fa2. Missing indexable routes — /chains, /ecosystem, /security, /status, /governance, Unknown slugs — isIndexableRoute and resolveRouteMetadata now require the slug to Tests — og-metadata.test.ts now asserts indexability and image slugs for the full |
Dynamic routes reused the English manifest/case-study copy for every locale and only the generated image filename carried a locale prefix. Adds an ogContent table to the en, es and pt bundles — the dynamic equivalent of ogRoutes, keyed by locale-independent route path — and resolves titles, descriptions and image content through it in both resolveRouteMetadata and listOgImageJobs, so the rendered image itself receives the localized copy. English entries mirror the source content exactly, so English output is unchanged; a new post or case study without ogContent entries falls back to the source data and the parity test below fails until translations are added.
|
Implemented the remaining locale issue in "41cedde". Dynamic "/blog/" and "/case-studies/" OG metadata now resolves localized titles, descriptions, URLs, and image content independently for "en", "es", and "pt". I also added coverage to verify:
All checks pass: 302 tests, build (75 images), TypeScript, a11y, i18n lint, JSON-LD validation, formatting, and "git diff --check". The Spanish and Portuguese copy is newly written and can be adjusted if native-language review finds any wording issues. |
|
Merged. The final head covers every indexable route, all three locales, generated image content, and unknown slugs. Thanks for addressing each review round carefully. |
Summary
Expands route-specific Open Graph metadata and image generation across all indexable route families instead of limiting bot metadata handling to a small set of middleware exceptions.
What changed
Validation
The existing unrelated test failures were not introduced by this change.
Closes #162