Skip to content

refactor(docs): consume OG images from @uxfront/layer-docs (UXF-122) - #334

Closed
alexgrozav wants to merge 1 commit into
mainfrom
agent/palette/01a051e8-1788080830
Closed

alexgrozav wants to merge 1 commit into
mainfrom
agent/palette/01a051e8-1788080830

Conversation

@alexgrozav

Copy link
Copy Markdown
Contributor

Description

The other half of UXF-122. @uxfront/layer-docs now registers nuxt-og-image and calls defineOgImage from its own docs and landing pages, so everything this app carried locally to make OG cards work is deleted:

  • app/components/OgImage/OgImage{Docs,Landing}.satori.vue — both moved into the layer verbatim.
  • app/pages/[[lang]]/[...slug].vue and app/pages/[[lang]]/docs/[section]/[...slug].vue — both were documented as "delete this override once OG image support lands in the layer". Diffed against the layer copies before deleting: the only deltas were formatting and headline: "styleframe" vs the layer's appConfig.header?.title, and app.config.ts sets title: "styleframe", so the rendered headline is identical.
  • The nuxt-og-image module registration and the local ogImage: { zeroRuntime: true } block in nuxt.config.ts — both now come from the layer.

The card accent changes, and that is the fix. The deleted templates hardcoded text-emerald-500 while ui.colors.primary is teal. The layer resolves the accent from --ui-primary at build time, so the card now renders the actual brand colour. Parity here is layout, type and composition — not the hex.

@resvg/resvg-js is added explicitly. It was only ever present via pnpm's optional-peer auto-install; the layer names it as a real peer because satori emits SVG only and needs a rasteriser to produce the PNG.

Not touched: app/pages/[[lang]]/changelog/{index,[slug]}.vue. Both still call defineOgImage("DocsSatori", …), which keeps working because the layer ships the same component name and props. Those files are UXF-180's.

Related issue

Relates to UXF-122.

Type of change

  • ♻️ Refactor / internal (no functional change)

(No functional change with one deliberate exception: the accent is now correct.)

Checklist

  • My commits follow Conventional Commits with a package scope
  • I ran pnpm build:nodocs && pnpm lint && pnpm typecheck && pnpm test — blocked, see below
  • @styleframe/docs is in the changesets ignore list, so no changeset applies
  • I did not edit generated files

Notes

Draft, and blocked on a publish. This app consumes @uxfront/layer-docs from npm, not the workspace. The dependency is bumped to ^0.4.0, which does not exist yet — it is the version that will carry the OG support. Until uxfront-com/uxfront#64 merges and releases, this branch cannot install or build, and the changelog pages' defineOgImage calls have no module behind them.

Ready to un-draft the moment 0.4.0 is on npm.

The layer now registers `nuxt-og-image` and calls `defineOgImage` from its
own pages, so the local module registration, both `.satori.vue` templates
and the two page overrides that existed only to call `defineOgImage` all go.

The card accent changes with them: the deleted templates hardcoded
`text-emerald-500` while `ui.colors.primary` is `teal`. The layer resolves
the accent from `--ui-primary`, so the card renders the actual brand colour.

Requires @uxfront/layer-docs 0.4.0, which carries the module registration
the changelog pages' `defineOgImage` calls now depend on.
@changeset-bot

changeset-bot Bot commented Aug 30, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 49ea3de

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel

vercel Bot commented Aug 30, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
styleframe-dev Error Error Aug 30, 2026 9:31am
styleframe-dev-storybook Error Error Aug 30, 2026 9:31am

Request Review

@alexgrozav

Copy link
Copy Markdown
Contributor Author

Closing during a tracker reset: the Multica issues tracking this work were deleted or cancelled, so this PR has no live owner or definition of done.

Not a judgement on the change itself — the branch is untouched and this PR can be reopened if the work is picked up again.

@alexgrozav alexgrozav closed this Aug 31, 2026

This branch had an error being deployed

2 failed deployments
Preview – styleframe-dev — 49ea3de9 Deployed Aug 30, 2026 by vercel[bot]
Preview – styleframe-dev-storybook — 49ea3de9 Deployed Aug 30, 2026 by vercel[bot]
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.

1 participant