docs(fern): scaffold Fern docs site mirroring published v0.4.0 sidebar#2196
Open
docs(fern): scaffold Fern docs site mirroring published v0.4.0 sidebar#2196
Conversation
Migrates the Sphinx MyST docs in docs/ to a Fern MDX site under fern/.
Sidebar structure, section captions, page titles, and Model Coverage
child ordering are taken verbatim from
docs.nvidia.com/nemo/automodel/latest, not from the local source
toctree, so engineers can side-by-side diff against the published 0.4.0
site without spurious title changes.
- 130 source .md files converted to .mdx under fern/versions/v0.4/pages/
- versions/{latest,nightly}.yml added as aliases (v0.4 is the current GA
train; nightly tracks main once it has its own content)
- explicit slug: overrides on every page so URLs stay short while sidebar
titles match the verbose published H1s
- NVIDIA theme + custom-domain (docs.nvidia.com/nemo/automodel) wired up
- redirects generated to preserve old Sphinx /index.html and .html links
- docs/ tree left in place; remove in a follow-up PR after preview review
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Signed-off-by: Lawrence Lane <llane@nvidia.com>
… site Adds the bundled Fern CI suite from the convert-to-fern toolkit and the `experimental.basepath-aware: true` flag required for subpath-hosted sites (docs.nvidia.com/nemo/automodel). - fern-docs-ci.yml — `fern check` on PRs. Trigger uses the FW-CI mirror bot pattern (`push: branches: pull-request/[0-9]+`) — same as build-docs.yml — so DOCS_FERN_TOKEN is available even for fork PRs. This is the fix landed in NVIDIA-NeMo/Gym#1241. - fern-docs-preview-build.yml + fern-docs-preview-comment.yml — two-workflow split: build collects PR sources without secrets (safe for forks), comment workflow is triggered via workflow_run with the trusted base context, builds the preview, and posts a herb-emoji PR comment. - publish-fern-docs.yml — publishes to docs.nvidia.com/nemo/automodel on push to main with fern/** changes or via workflow_dispatch. Required org secret: DOCS_FERN_TOKEN (already present for build-docs.yml). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> Signed-off-by: Lawrence Lane <llane@nvidia.com>
Adds the API reference Sphinx had via autodoc2, plus contributor-facing make targets so nobody has to memorize `cd fern && fern …` incantations. - libraries: in fern/docs.yml — Fern clones the repo and generates Markdown from the nemo_automodel package source on every preview / publish. lang: python uses Pyright-based extraction. - versions/v0.4/pages/api-reference/index.mdx — overview landing page describing the key modules (matches Gym's pattern in #1241). - API Reference section added under "Development" in v0.4.yml (and re-synced into latest.yml + nightly.yml) — placement mirrors the published Sphinx site, where apidocs/index sat as the last entry of the Development caption. - index.mdx Card href updated from the GitHub-source workaround to the in-site /development/api-reference/overview route. - fern/product-docs/ added to .gitignore — generated tree, recreated by `fern docs md generate` on demand. Gym does not commit theirs either. - Top-level Makefile: docs, docs-check, docs-preview, docs-publish targets. `make docs` runs `fern docs md generate` then `fern docs dev` so the local preview shows the API reference too (otherwise cold dev fails with "Folder not found: ./product-docs/..."). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> Signed-off-by: Lawrence Lane <llane@nvidia.com>
Two artifacts to make the new Fern site discoverable and maintainable: - fern/README.md — human-facing orientation: layout, local-dev quick reference, sidebar-fidelity rule, authoring conventions (frontmatter, components, version-agnostic links, cross-repo refs), versioning cookbook, CI overview, troubleshooting table. - skills/fern-docs/SKILL.md — agent skill following the same name/description/when_to_use frontmatter convention as the existing AutoModel skills (cicd, recipe-development, etc.). Covers the four page operations (add/update/move/remove), the single-canonical-tree rule that distinguishes us from Gym's old two-version mirror, slug override + redirect cookbook, fern check / preview / publish workflow, version-train cut procedure, and a debugging table. - AGENTS.md + skills/README.md — register the new skill in both indexes so it shows up alongside cicd, testing, model-onboarding, etc. Both documents are tailored to AutoModel's actual setup — single content tree at fern/versions/v0.4/pages/, three nav-YAML aliases (latest, nightly, v0.4), Make-driven local commands, FW-CI mirror-bot trigger pattern, sidebar-parity-with-published-v0.4.0 rule. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> Signed-off-by: Lawrence Lane <llane@nvidia.com>
Previously v0.4.yml just pointed at ./nightly/pages/ — same files, two slugs. That's wrong: 0.4.0 is a frozen release snapshot and needs its own independent copy of every page so it can stay still while nightly moves forward. - cp -r fern/versions/nightly fern/versions/v0.4 — physical duplicate of all 130 pages and 12 image assets. Byte-for-byte identical today (we just shipped 0.4.0); will diverge as nightly accumulates post-release edits and v0.4 stays frozen except for explicit back-ports. - Updated fern/versions/v0.4.yml paths from ./nightly/pages/ → ./v0.4/pages/. - Updated fern/versions/latest.yml paths from ./nightly/pages/ → ./v0.4/pages/ (latest is the GA alias; today it serves v0.4 content; repointed at the next GA's tree when one is cut). - README and skill rewritten to be explicit: nightly/ and v0.4/ are separate, independent trees; default editing target is nightly/; v0.4/ only changes via deliberate back-port. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> Signed-off-by: Lawrence Lane <llane@nvidia.com>
Matches the existing capitalization of Latest in the same dropdown and the Main label NeMo Gym uses for their bleeding-edge slug. The URL slug stays lowercase (`/nightly/...`). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> Signed-off-by: Lawrence Lane <llane@nvidia.com>
… 403 case NVIDIA-NeMo/Gym#1185 surfaces the recurring confusion: contributors run `fern docs md generate` and get `HTTP 403: User does not belong to organization`, with no breadcrumb back to the fix. The fix is a specific 3-step sequence — sign in to dashboard.buildwithfern.com (not Google SSO; use email/magic-link so Fern provisions the account), then `fern login` from the CLI. Skipping step 1 leaves the CLI auth flow without a working path forward. Adds: - `make docs-login` — first-time auth helper that prints the 3-step flow and then runs `fern login`. - `docs-generate-library` extracted as its own target and wrapped in a shell trap that prints the recovery pointer (`make docs-login`) when the autodoc step fails. `make docs` now depends on it. Mirrors the same change landing in NVIDIA-NeMo/Gym#1255 for the Gym Makefile. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> Signed-off-by: Lawrence Lane <llane@nvidia.com>
The previous version slept 2 seconds then ran `fern login` — not enough time for the user to actually open the browser, sign in to dashboard.buildwithfern.com, and confirm the 'nvidia' org is visible. If they didn't, the CLI launches in a state where it can't authenticate (no email entry path forward, per #1185 slack thread). Now the target prompts: Have you completed step 1 (dashboard sign-in)? [yes/N]: and bails with a clear "go do step 1, then re-run" message on anything other than yes. Mirrors the same change in NVIDIA-NeMo/Gym#1255. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> Signed-off-by: Lawrence Lane <llane@nvidia.com>
6 tasks
- Adds a `## Quickstart` section that walks new contributors through the install-CLI → docs-login → make docs flow with one block of copy-pasteable commands. - Adds a `### Fern CLI + docs reference` table linking to the upstream Fern documentation pages we actually point people at (CLI, components, frontmatter, versioning, redirects, libraries), plus the dashboard URL and #fern Slack channel. The skill had only the in-repo links; this surfaces the upstream ones the way the user asked. - Drops the "Latest preview" row from the Quick links table (the hosted preview URL `nemo-automodel.docs.buildwithfern.com/...` shouldn't be linked publicly from this README). - Replaces the old "First-time setup" subsection in the Local development block with a pointer to the new Quickstart, since `make docs-login` already does the work. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> Signed-off-by: Lawrence Lane <llane@nvidia.com>
Contributor
|
PR Review — Sphinx → Fern Migration Scaffolding Checks Completed
Verdict |
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
conversion preview
Migrates the NeMo AutoModel docs from Sphinx (
docs/) to a Fern MDX site (fern/), mirroring the published v0.4.0 sidebar at https://docs.nvidia.com/nemo/automodel/latest verbatim — engineers can side-by-side diff against the live site without spurious title shifts. The Sphinx tree underdocs/is left in place for now; removal is a follow-up PR after preview sign-off.Content layout
nightly/pages/andv0.4/pages/are separate, independent content trees with their own copy of every file. They're byte-identical today (0.4.0 just shipped from this exact content) and will diverge as nightly accumulates post-release edits.latest.ymlmounts the current GA's content (today:./v0.4/pages/...).Version dropdown matches the published Sphinx site:
nightlylatestv0.4What's in this PR
.mdfiles, plus 12 image assets, into MDX. Sidebar structure, section captions, page titles, and Model Coverage child ordering are taken verbatim from the published v0.4.0 site (not from the local source toctree, which has post-release additions).nightly/pages/andv0.4/pages/— so 0.4.0 can stay frozen while nightly moves forward.latest.ymlis the GA alias.docs.nvidia.com/nemo/automodel.experimental.basepath-aware: trueset for subpath hosting./index.html,/<page>.html,/<version>/<path>/index.html, the legacy0.4→v0.4rewrite, and explicit per-version-root rules (/<version>/index.html) because Fern's:path*does not match the empty-path case (docs: fix broken links — redirects, GitHub source links, drift Curator#1938)./get-started/installation) while sidebar titles match the verbose published H1s (Install NeMo AutoModel).libraries:(replaces the Sphinxautodoc2setup). Pyright-extracts Markdown fromnemo_automodel/on every preview/publish;fern/product-docs/is gitignored.push: pull-request/[0-9]+, matching existingbuild-docs.yml):fern-docs-ci.yml—fern checkon PRsfern-docs-preview-build.yml+fern-docs-preview-comment.yml— split untrusted/trusted preview build that posts a 🌿 commentpublish-fern-docs.yml— publishes on push-to-main withfern/**changes, ondocs/v*tag, or via manual dispatchmake docs / docs-check / docs-preview / docs-publishtargets so contributors don't have to memorizecd fern && fern …invocations.fern/README.md— human-facing orientation (layout, local dev, sidebar fidelity rule, authoring conventions, versioning cookbook, troubleshooting).skills/fern-docs/SKILL.md— agent skill registered inAGENTS.mdandskills/README.md(entry ddp parity #10) covering page operations, slug + redirect cookbook, redirect quirks (:path*empty-path gotcha), pnpm 10 esbuild gotcha, and the cut-a-new-train procedure.Required infrastructure
DOCS_FERN_TOKENorg secret — already wired for the existingbuild-docs.yml; no new setup needed.fern-docs-ci.ymltriggers on the samepull-request/[0-9]+branches the bot already pushes to forbuild-docs.yml.What's NOT in this PR
docs/removal. Left in place so reviewers can diff Fern output against the Sphinx source. Remove in a follow-up after preview review.v0.4/pages/is the same content asnightly/pages/(current main); a true v0.4.0 snapshot would need to be migrated from the v0.4.0 git tag'sdocs/. Out of scope here; back-fill in a follow-up.release-nightly-docs.yml; a Fern equivalent that publishesversions/nightly/pages/on push-to-main is a follow-up. The currentpublish-fern-docs.ymlonly fires ondocs/v*tags or manual dispatch.release-docs.ymlandrelease-nightly-docs.ymlcontinue to publish the Sphinx site; retire or repoint atfern/once Fern is the canonical source.Validation
All 7 convert-to-fern validation checks pass:
validate_fern_version_ymlfern_checkfern_docs_broken_links(advisory--skip-broken-links; strict mode false-positives on version-agnostic links)check_mdx_safetycheck_unconvertedvalidate_fern_internal_links(URLMap-based, authoritative)sanity_check_migrationTest plan
make docslocally, confirm sidebar groups match the published 0.4.0 site one-for-onedocs.nvidia.com/nemo/automodel/latest(e.g. "Install NeMo AutoModel", "Supervised Fine-Tuning (SFT) and Parameter-Efficient Fine-Tuning (PEFT) with NeMo AutoModel", "Fine-Tuning Gemma 4 31B on CORD-v2 Receipts — End-to-End Guide")/get-started/installation,/recipes-e2e-examples/sft-peft,/model-coverage/large-language-models/llamagemma3-3n.mdx(medpix images),databricks.mdx(GPU metrics),pretraining.mdx(gpt2 loss),fp8-training.mdx,latest-models.mdx(Brev launchable badge)docs.nvidia.com/nemo/automodel/v0.4/index.html→/v0.4(the empty-path case),/nemo/automodel/about/index.html→/about,/0.4/<path>→/v0.4/<path>product-docs/nemo-automodel/Full-Library-Reference/)Commits
0b3751ef5a953d70basepath-awarea8444868233138ddfern/README.md+skills/fern-docs/SKILL.mdagent skill420b59d28d173557_nav_order/_nav_titlesmigration sidecars4d65d764nightlyas the canonical YAML namea181840cnightlyandv0.4into separate physical content treesAll commits are DCO-signed.
🤖 Generated with Claude Code