Skip to content

docs(fern): use NVIDIA global-theme + fix out-of-fern page imports#25

Merged
lbliii merged 2 commits into
lbliii/fern-docs-portfrom
lbliii/fern-pr-repo-move
May 22, 2026
Merged

docs(fern): use NVIDIA global-theme + fix out-of-fern page imports#25
lbliii merged 2 commits into
lbliii/fern-docs-portfrom
lbliii/fern-pr-repo-move

Conversation

@lbliii
Copy link
Copy Markdown

@lbliii lbliii commented May 22, 2026

Summary

  • Switch docs/fern/docs.yml to global-theme: nvidia (from NVIDIA/fern-components) and multi-source: true, deleting ~1100 lines of bespoke brand CSS, the CustomFooter, NVIDIA SVGs/favicons, and the Adobe DTM JS in favor of the shared theme; keep only a partial logo: { right-text: NeMo Platform } override (matches Curator's pattern).
  • Fix Could not resolve "../fern/snippets/..." and Could not resolve "../fern/components/Button" build errors on pages mounted from outside docs/fern/ — Fern's bundler refuses ..-escapes back into the fern dir, so @/ aliased imports fail at bundle time even though fern check passes.
  • Replace import X from "@/snippets/..." + <X /> with Fern-native <Markdown src="/snippets/..." /> tags (18 pages); drop import { Button } and rely on experimental.mdx-components for bare <Button> tags (3 pages); refactor NotebookViewer.tsx to register all 7 notebooks internally and accept a name= prop so pages no longer import notebook data (7 pages).

Test plan

  • cd docs/fern && npx fern-api@latest check — passes locally
  • Fern preview build renders the previously failing pages (docs/pysdk/index.mdx, docs/auditor/index.mdx, docs/customizer/tutorials/*-customization-job.mdx) without "Could not resolve" errors
  • Spot-check that the NVIDIA global theme renders correctly on preview (logo, colors, footer, right-text "NeMo Platform")
  • Confirm functional CSS (notebook viewer, button styles) still loads — if Fern drops the consumer-side css: array under global-theme, follow up by inlining those styles into the components

🤖 Generated with Claude Code

@lbliii lbliii requested review from a team as code owners May 22, 2026 15:53
lbliii and others added 2 commits May 22, 2026 11:55
Use `global-theme: nvidia` from NVIDIA/fern-components for shared
colors, footer, logos, layout, and Adobe DTM JS. Keep only a partial
`logo: { right-text: NeMo Platform }` override and the functional
notebook-viewer/button CSS. Set `multi-source: true` on the instance
to match Curator's pattern. Repoint navbar GitHub link to the new
NVIDIA-NeMo/nemo-platform repo.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Signed-off-by: Lawrence Lane <llane@nvidia.com>
…pages

Pages mounted from outside docs/fern/ (via `path: ../../foo.mdx` in
versions/latest.yml) couldn't resolve `@/snippets/...` or
`@/components/...` imports — Fern's bundler refuses the `..`-escape
back into the fern dir, surfacing as `Could not resolve` errors at
build time.

Three swaps, all using Fern's documented patterns:

- Snippets: `import X from "@/snippets/foo.mdx"` + `<X />` →
  `<Markdown src="/snippets/foo.mdx" />` (Fern-native JSX, bypasses
  esbuild). 18 pages.
- Components: drop `import { Button } from "@/components/Button"` —
  bare `<Button>` tags work via experimental.mdx-components. 3 pages.
- NotebookViewer: register all 7 notebooks in NotebookViewer.tsx
  itself and accept a `name=` prop, so pages no longer need to
  import notebook data. 7 pages + NotebookViewer.tsx.

Also updates scripts/README.md to document the registry pattern and
the new NVIDIA-NeMo/nemo-platform repo URL.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Signed-off-by: Lawrence Lane <llane@nvidia.com>
@lbliii lbliii force-pushed the lbliii/fern-pr-repo-move branch from 2ad6336 to 520ed0a Compare May 22, 2026 15:55
@lbliii lbliii merged commit 381e0a9 into lbliii/fern-docs-port May 22, 2026
5 of 6 checks passed
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.

1 participant