Skip to content

Document redesigned dynamic OG images with toggle flags and color overrides#4322

Merged
devalog merged 13 commits intomainfrom
devin/1773760543-og-text-color-docs
Apr 29, 2026
Merged

Document redesigned dynamic OG images with toggle flags and color overrides#4322
devalog merged 13 commits intomainfrom
devin/1773760543-og-text-color-docs

Conversation

@kgowru
Copy link
Copy Markdown
Contributor

@kgowru kgowru commented Mar 17, 2026

Summary

Documents the redesigned dynamic OG image feature, adding eight new docs.yml metadata settings that match the current implementation in fern-platform and fern CLI:

  • Color overrides: og:dynamic:text-color and og:dynamic:background-color — override auto-detected theme colors
  • Logo variant: og:dynamic:logo-color — choose dark or light logo variant
  • Toggle flags: og:dynamic:show-logo, og:dynamic:show-section, og:dynamic:show-description, og:dynamic:show-url, og:dynamic:show-gradient — show/hide individual OG image elements

Changes:

  • metadata.mdx: Added ParamField entries for all 8 new settings, expanded the YAML example block, added default values and fallback descriptions to all existing fields
  • seo-metadata-site.mdx: Added the new fields to the snippet YAML example and ParamField list
  • changelog/2026-04-29.mdx: Changelog entry for the OG image redesign

Companion PRs (both merged):

Review & Testing Checklist for Human

  • Preview the metadata page and confirm the 8 new ParamField entries render correctly under "Dynamic OG images" — verify default={true} on toggle flags and default="dark" on og:dynamic:logo-color
  • Confirm the YAML example block in metadata.mdx and the snippet in seo-metadata-site.mdx list the same 8 fields
  • Verify the changelog entry at /learn/docs/changelog/2026/4/29 renders correctly and the "Read the docs" button links to the right anchor

Notes

The changelog was moved from 2026-04-23.mdx to 2026-04-29.mdx because the original date was already taken by an unrelated entry on main. Merge conflicts with main have been resolved. The docs.yml tag was removed from changelog tags to match convention.

Link to Devin session: https://app.devin.ai/sessions/248116ef41de45f28f0d8e0c7ad540de
Requested by: @devalog

… entry

Co-Authored-By: Kapil Gowru <k.gowru@gmail.com>
@devin-ai-integration
Copy link
Copy Markdown
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 17, 2026


## 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.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [vale] reported by reviewdog 🐶
[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.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [vale] reported by reviewdog 🐶
[FernStyles.Current] Avoid time-relative terms like 'now' that become outdated

@devin-ai-integration devin-ai-integration Bot changed the title Add og:text-color and og:background-color documentation and changelog Add og:dynamic:text-color and og:dynamic:background-color documentation and changelog Mar 17, 2026
devin-ai-integration Bot and others added 2 commits March 17, 2026 16:23
Co-Authored-By: Kapil Gowru <k.gowru@gmail.com>
…sign

Co-Authored-By: Kapil Gowru <k.gowru@gmail.com>
@devin-ai-integration devin-ai-integration Bot changed the title Add og:dynamic:text-color and og:dynamic:background-color documentation and changelog Document redesigned dynamic OG images with toggle flags and color overrides Mar 17, 2026
@github-actions
Copy link
Copy Markdown
Contributor

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.

@github-actions github-actions Bot added the Stale This PR hasn't has any commits or comments in 25 days or more. label Apr 12, 2026
@devalog devalog closed this Apr 15, 2026
<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>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 [vale] reported by reviewdog 🐶
[FernStyles.Headings] 'Twitter / X' should use sentence-style capitalization.

@github-actions github-actions Bot removed the Stale This PR hasn't has any commits or comments in 25 days or more. label Apr 21, 2026
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.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [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.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [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.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [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.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [vale] reported by reviewdog 🐶
[Microsoft.Contractions] Use 'they're' instead of 'they are'.

@devin-ai-integration
Copy link
Copy Markdown
Contributor

❌ Cannot revive Devin session - the session is too old. Please start a new session instead.

devin-ai-integration Bot and others added 2 commits April 28, 2026 17:00
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.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [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.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [vale] reported by reviewdog 🐶
[Microsoft.Units] Don't spell out the number in 'in pixels'.

devin-ai-integration Bot and others added 2 commits April 29, 2026 16:01
Co-Authored-By: Devin Logan <devinannlogan@gmail.com>
@devalog devalog merged commit 152aca5 into main Apr 29, 2026
2 checks passed
@devalog devalog deleted the devin/1773760543-og-text-color-docs branch April 29, 2026 16:23
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.

2 participants