From c7b27e161295a350d3de34aa4e701180ac87400c Mon Sep 17 00:00:00 2001 From: "ryan.stephen" Date: Fri, 13 Nov 2026 21:41:13 +0000 Subject: [PATCH 1/2] docs: add fern docs theme rebuild Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- .../cli-api-reference/pages/docs-commands.mdx | 39 +++++++++++++++++++ .../pages/customization/global-themes.mdx | 7 ++++ 2 files changed, 46 insertions(+) diff --git a/fern/products/cli-api-reference/pages/docs-commands.mdx b/fern/products/cli-api-reference/pages/docs-commands.mdx index c3e53c5e5e..6e19ccbf79 100644 --- a/fern/products/cli-api-reference/pages/docs-commands.mdx +++ b/fern/products/cli-api-reference/pages/docs-commands.mdx @@ -23,6 +23,7 @@ These commands build, preview, and publish a Fern documentation site, and valida | [`fern docs theme download`](#fern-docs-theme-download) | Download a theme from Fern's registry into a local directory | | [`fern docs link check`](#fern-docs-link-check) | Check for broken links on a live documentation site | | [`fern docs theme list`](#fern-docs-theme-list) | List all themes for your organization | +| [`fern docs theme rebuild`](#fern-docs-theme-rebuild) | Rebuild sites built with an older version of a theme | | [`fern mcp install`](#fern-mcp-install) | Connect a coding agent to your organization's Fern MCP server | ## Detailed command documentation @@ -614,6 +615,44 @@ These commands build, preview, and publish a Fern documentation site, and valida + + + Use `fern docs theme rebuild` to rebuild every site in your organization that was built with an older version of a [theme](/learn/docs/customization/global-themes#updating-a-theme). Each site is rebuilt from its last publish with the latest uploaded theme, so child repositories don't need to publish again. Running it requires an organization admin. + + + ```bash + fern docs theme rebuild [--name ] [--dry-run] [--org ] + ``` + + + The command prints each site it rebuilds. Rebuilds run in the background, and each site picks up the theme when its build finishes. + + ### name + + Use `--name` to only rebuild sites using one theme. Defaults to every theme in the organization. + + ```bash + fern docs theme rebuild --name my-theme + ``` + + ### dry-run + + Use `--dry-run` to list the sites that would be rebuilt without rebuilding them. + + ```bash + fern docs theme rebuild --dry-run + ``` + + ### org + + Use `--org` to override the organization ID from `fern.config.json`. + + ```bash + fern docs theme rebuild --org my-org + ``` + + + Use `fern mcp install` to register [your organization's Fern MCP server](/learn/docs/ai-features/fern-mcp-servers) with a coding agent, giving it Fern's own documentation and configuration reference alongside your live sites, deployments, analytics, and reader activity — the same tools [Fern Agent](/learn/docs/ai-features/fern-agent) works from. diff --git a/fern/products/docs/pages/customization/global-themes.mdx b/fern/products/docs/pages/customization/global-themes.mdx index d6f9736571..0f9aac0f0c 100644 --- a/fern/products/docs/pages/customization/global-themes.mdx +++ b/fern/products/docs/pages/customization/global-themes.mdx @@ -124,6 +124,13 @@ fern docs theme export fern docs theme upload --name my-theme ``` +To apply the update without waiting for each child repository to publish again, run [`fern docs theme rebuild`](/learn/cli-api-reference/cli-reference/docs-commands#fern-docs-theme-rebuild). It rebuilds every site in your organization that was built with an older version of the theme, using the content from that site's last publish. Running it requires an organization admin. + +```bash +fern docs theme rebuild --name my-theme --dry-run +fern docs theme rebuild --name my-theme +``` + ## Self-hosted sites A [self-hosted](/learn/docs/self-hosted/set-up#vendor-a-global-theme) container has no access to Fern's registry, so it resolves `global-theme` from a copy of the theme vendored into the image with [`fern docs theme download`](/learn/cli-api-reference/cli-reference/docs-commands#fern-docs-theme-download). From 3235b19f27e7dfa77f790a05e92e1101264ff675 Mon Sep 17 00:00:00 2001 From: "ryan.stephen" Date: Fri, 13 Nov 2026 21:43:41 +0000 Subject: [PATCH 2/2] docs: mention fern docs theme rebuild in publish instructions Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- fern/products/home/pages/fern-instructions/docs/publish.mdx | 1 + 1 file changed, 1 insertion(+) diff --git a/fern/products/home/pages/fern-instructions/docs/publish.mdx b/fern/products/home/pages/fern-instructions/docs/publish.mdx index 9b46c9299e..d540bfa6f5 100644 --- a/fern/products/home/pages/fern-instructions/docs/publish.mdx +++ b/fern/products/home/pages/fern-instructions/docs/publish.mdx @@ -20,6 +20,7 @@ Use this to see a change before it ships, or to ship it. - `fern generate --docs` fails on any `fern check` rule set to `error`. - In CI, set `FERN_TOKEN` and pass `--no-prompt`. See `automate`. - Don't publish to production when the user asked for a preview. +- After `fern docs theme upload`, sites using that `global-theme` keep the old theme until they publish again. `fern docs theme rebuild` rebuilds them without a publish. It needs an org admin. Run `--dry-run` first to list the sites. ## Verify