Repository navigation
docs(fern): inject NVIDIA global-theme at publish time so local preview works (#10073) - #10288
Conversation
WalkthroughThis PR resolves external contributor build failures by decoupling the NVIDIA theme requirement from local development. The ChangesTheme configuration and deployment
🎯 2 (Simple) | ⏱️ ~8 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…ew works The committed fern/docs.yml set `global-theme: nvidia`, a private theme in Fern's registry (org: nvidia). When a contributor runs `fern docs dev` while logged into a Fern org or with FERN_TOKEN set, the CLI fetches the private theme with their token, receives HTTP 403, and renders a blank local preview (`Failed to read docs configuration. Rendering blank page.`). Contributors with no Fern credentials at all only get a warning, but the common logged-in case is broken — this is the failure reported in #10073. Remove `global-theme` from the committed config so `fern docs dev` works for all contributors (with or without a token), and inject it at publish time in the Fern Docs workflow, in the step that assembles the production docs.yml on the docs-website branch. That single injection covers both the PR preview and the main publish paths; the version-release job inherits it from the committed docs-website docs.yml, so production keeps the NVIDIA branding. Fixes #10073. Signed-off-by: zhongdaor <zhongdaor@nvidia.com> Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
54a1e77 to
7124d02
Compare
dagil-nvidia
left a comment
There was a problem hiding this comment.
Approving. Drops global-theme: nvidia from the source docs.yml and re-injects it at publish time so external contributors can run fern docs dev without the private NVIDIA theme 403'ing the local preview (#10073). Doc-surface change is clean.
…ew works (ai-dynamo#10073) (ai-dynamo#10288) Signed-off-by: zhongdaor <zhongdaor@nvidia.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: shenls <shenlinshan@kanzhun.com>
…ders Hosted PR previews built with global-theme: nvidia serve the theme's stylesheet and drop the project css: list — any fern/main.css change renders unstyled in previews (first observed on #10628, the first main.css change since the theme injection landed in #10288). Skip the theme for non-main builds; production publishes keep it. The repo main.css already contains the NVIDIA branding rules, so unthemed previews remain visually faithful. If the next preview of this PR renders styled, this also confirms the theme masks project CSS on the production publish path — tracked for a separate fix (update the theme or make project css override it). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ew works (ai-dynamo#10073) (ai-dynamo#10288) Signed-off-by: zhongdaor <zhongdaor@nvidia.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Summary
fern/docs.ymlsetglobal-theme: nvidia, a private theme in Fern's registry (orgnvidia). When a contributor runsfern docs devwhile logged into a Fern org (or withFERN_TOKENset), the CLI fetches that private theme with their token, gets HTTP 403, and renders a blank local preview. This is the breakage reported in #10073.This PR removes
global-themefrom the committed config sofern docs devworks for all contributors, and injects the theme at publish time so production docs keep the NVIDIA branding.Root cause
The Fern CLI (5.37.10) resolves
global-themelike this:FERN_TOKENset → fetchesnvidiatheme with that token → 403 →Failed to read docs configuration. Rendering blank page.The second case is common (many contributors have run
fern login), so the documentedfern docs devflow is broken for them.Fix
fern/docs.yml— removeglobal-theme: nvidiafrom the committed config (with an explanatory comment). The branding inlined indocs.yml(colors,typography,logo,main.css) still renders locally..github/workflows/fern-docs.yml— injectglobal-theme: nvidiaviayqin the step that assembles the productiondocs.ymlon thedocs-websitebranch. This single injection covers the PR-preview and main-publish paths; the version-release job inherits it from the committeddocs-websitedocs.yml, so production is unchanged.Validation
Ran
fern docs devin a clean checkout with a non-nvidiaFERN_TOKEN(reproducing the reported scenario):global-theme)Fetching global theme "nvidia"HTTP 403Failed to read docs configuration. Rendering blank page.localhost:3000previewConfirmed the CI injection (
yq -i '.global-theme = "nvidia"' docs.yml) restores the theme for production builds.Fixes #10073.
🤖 Generated with Claude Code
Summary by CodeRabbit