docs(fern): use NVIDIA global-theme + fix out-of-fern page imports#25
Merged
Conversation
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>
2ad6336 to
520ed0a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
docs/fern/docs.ymltoglobal-theme: nvidia(from NVIDIA/fern-components) andmulti-source: true, deleting ~1100 lines of bespoke brand CSS, theCustomFooter, NVIDIA SVGs/favicons, and the Adobe DTM JS in favor of the shared theme; keep only a partiallogo: { right-text: NeMo Platform }override (matches Curator's pattern).Could not resolve "../fern/snippets/..."andCould not resolve "../fern/components/Button"build errors on pages mounted from outsidedocs/fern/— Fern's bundler refuses..-escapes back into the fern dir, so@/aliased imports fail at bundle time even thoughfern checkpasses.import X from "@/snippets/..."+<X />with Fern-native<Markdown src="/snippets/..." />tags (18 pages); dropimport { Button }and rely onexperimental.mdx-componentsfor bare<Button>tags (3 pages); refactorNotebookViewer.tsxto register all 7 notebooks internally and accept aname=prop so pages no longer import notebook data (7 pages).Test plan
cd docs/fern && npx fern-api@latest check— passes locallydocs/pysdk/index.mdx,docs/auditor/index.mdx,docs/customizer/tutorials/*-customization-job.mdx) without "Could not resolve" errorscss:array underglobal-theme, follow up by inlining those styles into the components🤖 Generated with Claude Code