Skip to content

docs(fern): adopt NVIDIA global theme as source of truth - #1413

Merged
lbliii merged 3 commits into
mainfrom
lbliii/fern-centralized-theme
May 26, 2026
Merged

lbliii merged 3 commits into
mainfrom
lbliii/fern-centralized-theme

Conversation

@lbliii

@lbliii lbliii commented May 26, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Adopt the nvidia global theme published from NVIDIA/fern-components by setting global-theme: nvidia in fern/docs.yml.
  • Remove theme-owned fields that will now be inherited at publish time: footer, layout, colors, theme, favicon, js, css, navbar-links, and the asset paths from logo (dark, light, height, href).
  • Keep child-owned fields: instances, title, libraries, experimental, versions, redirects, and per-version navigation.
  • Leave a minimal local logo.right-text: NeMo Gym to override the theme's hardcoded right-text: Documentation.

Mirrors the migration in NVIDIA-NeMo/Curator#2000.

Why

Centralizes NVIDIA branding so logos, fonts, CSS/JS, and footer policy links live in one upstream repo. Future brand updates land via re-uploading the theme rather than per-repo PRs.

Test plan

  • Trigger a Fern cloud preview deploy on this branch (auto-posted by .github/workflows/fern-docs-preview-comment.yml).
  • Verify NVIDIA logo, fonts, colors, footer policy links, and OneTrust JS render from the global theme.
  • Verify header shows "NeMo Gym" (override wins) or "Documentation" (theme wins) — record which.
  • Confirm the GitHub repo link in the header is present (theme-provided) or note its absence.
  • Spot-check a couple of pages across main and v0.2.1 to confirm nav/content are unchanged.
  • Confirm redirects still resolve correctly.

🤖 Generated with Claude Code

Set `global-theme: nvidia` in `fern/docs.yml` and remove theme-owned
fields (`footer`, `layout`, `colors`, `theme`, `favicon`, `js`, `css`,
`navbar-links`, and the asset paths from `logo`). Centralizes NVIDIA
branding upstream at NVIDIA/fern-components so future brand updates
land via re-uploading the theme rather than per-repo PRs.

Keep `logo.right-text: NeMo Gym` as a local override since the
`nvidia` theme hardcodes `right-text: Documentation`. Mirrors the
approach in NVIDIA-NeMo/Curator#2000.

Local theme assets (`fern/main.css`, `fern/components/CustomFooter.tsx`,
`fern/assets/NVIDIA_*.svg`) are intentionally left on disk for safe
revert; cleanup PR to follow once the Fern preview confirms the theme
renders correctly.

Co-Authored-By: Claude Opus 4.7 <[email protected]>
Signed-off-by: Lawrence Lane <[email protected]>
Now that `global-theme: nvidia` inherits the footer, logos, favicon,
fonts, OneTrust JS, and base CSS from NVIDIA/fern-components, remove
the duplicated local copies:

- `fern/assets/NVIDIA_{dark,light,symbol}.svg` (logos + favicon)
- `fern/components/CustomFooter.tsx`
- `fern/main.css` (95% duplicated the central theme)

Also drop unused custom components with zero MDX references:
- `BadgeLinks.tsx`, `CTAButtons.tsx`, `Include.tsx`, `NotebookViewer.tsx`

`NavButton.tsx` is still used by 29 MDX pages and has Gym-specific
styles the theme doesn't ship. Co-locate those rules in a sibling
`NavButton.css` and load via `import "./NavButton.css"` so the
custom-component CSS lives next to its TSX. Brand variables
(`--nv-color-green`, `--nv-light-grey-3`, `--rounded`, etc.) are
defined by the global theme's `:root` and resolve at publish time.

Refresh `fern/README.md` to drop references to removed files, document
the co-located CSS convention, and codify which `docs.yml` fields are
now theme-owned (don't re-add).

Co-Authored-By: Claude Opus 4.7 <[email protected]>
Signed-off-by: Lawrence Lane <[email protected]>
The `import "./NavButton.css"` side-effect was unresolved by Fern's MDX
component bundler ("Could not resolve ./NavButton.css"). Move the rules
into a sibling `<style>` block rendered inside the component instead.

Brand vars are referenced with fallbacks (`var(--nv-color-green, #74B900)`)
so the component still styles correctly if the theme load is delayed or
the variable isn't defined in some context.

Co-Authored-By: Claude Opus 4.7 <[email protected]>
Signed-off-by: Lawrence Lane <[email protected]>
@lbliii
lbliii merged commit 2502893 into main May 26, 2026
20 checks passed

This branch was previously deployed

1 inactive deployment
public — 84d55131 Deployed May 26, 2026 by copy-pr-bot[bot] via release / finalize / notify #203
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