feat(website): per-page Open Graph cards for /quickstart and /features/cli#196
Merged
Conversation
…s/cli Two pages now have their own social card, layered on top of the sitewide card shipped in #193. Both follow the same template (dark #0E0E10 background, white wordmark, teal accent, attribution) and only swap the tagline, the two pillar rows, and the URL footer: /quickstart → "Your first Charter, closed in 10–15 minutes." declare → execute → log → validate → audit Six sections · copy-paste commands · one Rust binary /features/cli → "One Rust binary. Eleven commands. No daemons." init · validate · audit · analyze · compliance · ... Deterministic outputs you can grep, jq, pipe to CI. Wired via the `image:` frontmatter on the source MDX in each of the three locales (en/es/zh-CN). Card design is intentionally locale- agnostic — the visuals work the same regardless of which language the linked page renders in. Gotcha worth noting: Docusaurus' plugin-content-pages prefixes the locale path onto a frontmatter `image: img/...`, so the meta tag would point at /es/img/og/quickstart.png (a 404). Used absolute URLs (https://straymark.dev/img/og/...) to bypass that resolution — same domain as `themeConfig.image` resolves to anyway, so consistent. Blog index intentionally not addressed (the blog plugin doesn't expose a per-instance OG image config without swizzling). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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
Follow-up to #193 (sitewide branded card). Adds page-specific Open Graph cards for the two highest-impact internal pages.
Cards
/quickstart→static/img/og/quickstart.png/features/cli→static/img/og/cli.pngBoth use the same template as the sitewide card (dark
#0E0E10background, white wordmark, teal#25C2A0accent, attribution) and swap only the tagline, the two pillar rows, and the URL footer.SVG sources live next to the PNGs (
static/img/og/{quickstart,cli}.svg). Sameinkscaperender command in the README of #193 applies.Wiring
image:frontmatter on the source MDX of each page across the three locales:website/src/pages/quickstart.mdxwebsite/i18n/es/docusaurus-plugin-content-pages/quickstart.mdxwebsite/i18n/zh-CN/docusaurus-plugin-content-pages/quickstart.mdxwebsite/src/pages/features/cli.mdxwebsite/i18n/es/docusaurus-plugin-content-pages/features/cli.mdxwebsite/i18n/zh-CN/docusaurus-plugin-content-pages/features/cli.mdxCard design is intentionally locale-agnostic — the same PNG is referenced from all three locale versions of each page.
Gotcha: absolute URL in frontmatter
@docusaurus/plugin-content-pagesresolves a frontmatterimage: img/...relative to the current locale's baseUrl. For/es/quickstartthat ended up pointing at/es/img/og/quickstart.png— a 404, because the static asset only lives at/img/og/...(no locale split). Used absolute URLs (https://straymark.dev/img/og/...) to bypass the resolution, which matches whatthemeConfig.imageends up serializing to anyway.Pages NOT changed
/straymark.png— already correct as the broad-strokes landing card/blogindex/features/*(×8)/privacy,/docs/*Test plan
After deploy:
og:imagepointing at the right card (verified in build)https://straymark.dev/quickstartshows the quickstart cardhttps://straymark.dev/features/clishows the CLI cardhttps://straymark.dev/(landing) still shows the sitewide card — unchanged🤖 Generated with Claude Code