Document redesigned dynamic OG images with toggle flags and color overrides#4322
Document redesigned dynamic OG images with toggle flags and color overrides#4322
Conversation
… entry Co-Authored-By: Kapil Gowru <k.gowru@gmail.com>
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
|
🌿 Preview your docs: https://fern-preview-devin-1773760543-og-text-color-docs.docs.buildwithfern.com/learn Here are the markdown pages you've updated: |
|
|
||
| ## Dynamic OG image color overrides <Availability type="beta" /> [#og-color-overrides] | ||
|
|
||
| You can now control the text and background colors of dynamically generated OG images. Set `og:text-color` and `og:background-color` in your `docs.yml` metadata to override the auto-detected theme colors. This is useful when your site has a light background where the default white text is hard to read. |
There was a problem hiding this comment.
[FernStyles.Current] Avoid time-relative terms like 'now' that become outdated
…dynamic:background-color Co-Authored-By: Kapil Gowru <k.gowru@gmail.com>
|
|
||
| ## Dynamic OG image color overrides <Availability type="beta" /> [#og-color-overrides] | ||
|
|
||
| You can now control the text and background colors of dynamically generated OG images. Set `og:dynamic:text-color` and `og:dynamic:background-color` in your `docs.yml` metadata to override the auto-detected theme colors. This is useful when your site has a light background where the default white text is hard to read. |
There was a problem hiding this comment.
[FernStyles.Current] Avoid time-relative terms like 'now' that become outdated
Co-Authored-By: Kapil Gowru <k.gowru@gmail.com>
…sign Co-Authored-By: Kapil Gowru <k.gowru@gmail.com>
|
This PR is stale because it has been open 25 days with no activity. Remove stale label or comment or this will be closed in 5 days. |
| <ParamField path="metadata.og:dynamic:show-gradient" type="boolean" required={false} default={true} toc={true}> | ||
| Toggle visibility of the accent gradient overlay in dynamically generated OG images. The gradient uses your accent color. Defaults to `true` when `og:dynamic` is enabled. | ||
| </ParamField> | ||
|
|
There was a problem hiding this comment.
📝 [vale] reported by reviewdog 🐶
[FernStyles.Headings] 'Twitter / X' should use sentence-style capitalization.
Co-Authored-By: Kapil Gowru <k.gowru@gmail.com>
| When `og:dynamic: true`, the following interactions apply. `fern check` surfaces warnings for each conflict so you can resolve them locally. | ||
|
|
||
| - `og:image` and `twitter:image` only apply to the homepage. Every other page uses the dynamically generated image. | ||
| - `og:dynamic:*` sub-settings and `og:background-image` are only read when `og:dynamic: true`. If dynamic generation is off, they are ignored. |
There was a problem hiding this comment.
🚫 [vale] reported by reviewdog 🐶
[Microsoft.Contractions] Use 'they're' instead of 'they are'.
|
|
||
| <ParamField path="metadata.og:image:width" type="number" required={false} toc={true}> | ||
| The width of your Open Graph image in pixels. | ||
| The width of your Open Graph image in pixels. Only applied when `og:image` is set. |
There was a problem hiding this comment.
🚫 [vale] reported by reviewdog 🐶
[Microsoft.Units] Don't spell out the number in 'in pixels'.
|
|
||
| <ParamField path="metadata.og:image:height" type="number" required={false} toc={true}> | ||
| The height of your Open Graph image in pixels. | ||
| The height of your Open Graph image in pixels. Only applied when `og:image` is set. |
There was a problem hiding this comment.
🚫 [vale] reported by reviewdog 🐶
[Microsoft.Units] Don't spell out the number in 'in pixels'.
| ### Dynamic OG images <Availability type="beta" /> [#dynamic-og-images] | ||
|
|
||
| Instead of using a single static image for all pages, you can enable dynamic OG image generation. When enabled, Fern automatically generates a unique `og:image` for each page that doesn't have one [set in frontmatter](#open-graph). | ||
| Instead of using a single static image for all pages, you can enable dynamic OG image generation. When enabled, Fern automatically generates a unique `og:image` for each page that doesn't have one [set in frontmatter](#open-graph). The `og:dynamic:*` sub-settings and `og:background-image` below are only read when `og:dynamic: true` — they are ignored otherwise. `fern check` surfaces warnings for conflicting settings so you can resolve them locally. |
There was a problem hiding this comment.
🚫 [vale] reported by reviewdog 🐶
[Microsoft.Contractions] Use 'they're' instead of 'they are'.
|
❌ Cannot revive Devin session - the session is too old. Please start a new session instead. |
Co-Authored-By: Kapil Gowru <k.gowru@gmail.com>
Co-Authored-By: Devin Logan <devinannlogan@gmail.com>
|
|
||
| <ParamField path="metadata.og:image:width" type="number" required={false}> | ||
| The width of your Open Graph image in pixels. | ||
| The width of your Open Graph image in pixels. No default; only used when `og:image` is set. |
There was a problem hiding this comment.
🚫 [vale] reported by reviewdog 🐶
[Microsoft.Units] Don't spell out the number in 'in pixels'.
|
|
||
| <ParamField path="metadata.og:image:height" type="number" required={false}> | ||
| The height of your Open Graph image in pixels. | ||
| The height of your Open Graph image in pixels. No default; only used when `og:image` is set. |
There was a problem hiding this comment.
🚫 [vale] reported by reviewdog 🐶
[Microsoft.Units] Don't spell out the number in 'in pixels'.
Co-Authored-By: Devin Logan <devinannlogan@gmail.com>
…com/fern-api/docs into devin/1773760543-og-text-color-docs
Co-Authored-By: Devin Logan <devinannlogan@gmail.com>
Summary
Documents the redesigned dynamic OG image feature, adding eight new
docs.ymlmetadata settings that match the current implementation in fern-platform and fern CLI:og:dynamic:text-colorandog:dynamic:background-color— override auto-detected theme colorsog:dynamic:logo-color— choosedarkorlightlogo variantog:dynamic:show-logo,og:dynamic:show-section,og:dynamic:show-description,og:dynamic:show-url,og:dynamic:show-gradient— show/hide individual OG image elementsChanges:
ParamFieldentries for all 8 new settings, expanded the YAML example block, added default values and fallback descriptions to all existing fieldsCompanion PRs (both merged):
Review & Testing Checklist for Human
ParamFieldentries render correctly under "Dynamic OG images" — verifydefault={true}on toggle flags anddefault="dark"onog:dynamic:logo-colormetadata.mdxand the snippet inseo-metadata-site.mdxlist the same 8 fields/learn/docs/changelog/2026/4/29renders correctly and the "Read the docs" button links to the right anchorNotes
The changelog was moved from
2026-04-23.mdxto2026-04-29.mdxbecause the original date was already taken by an unrelated entry on main. Merge conflicts with main have been resolved. Thedocs.ymltag was removed from changelog tags to match convention.Link to Devin session: https://app.devin.ai/sessions/248116ef41de45f28f0d8e0c7ad540de
Requested by: @devalog