Skip to content

docs: migrate Sphinx/MyST documentation to Fern - #4206

Draft
chenopis wants to merge 5 commits into
mainfrom
docs/fern-mdx-migration
Draft

chenopis wants to merge 5 commits into
mainfrom
docs/fern-mdx-migration

Conversation

@chenopis

@chenopis chenopis commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Summary

Migrates the Megatron-Bridge documentation from Sphinx/MyST to Fern MDX, mirroring the reference migration in NVIDIA-NeMo/Evaluator#1032 (which itself followed Automodel#2291).

Layout

  • 124 MDX pages across models/, training/, get-started/, about/ (incl. release-notes), troubleshooting/, resources/, use-cases/.
  • Fern infrastructure under docs/fern/: docs.yml (nav), fern.config.json, global-theme: nvidia (custom-domain docs.nvidia.com/nemo/megatron-bridge), versions/{nightly,v0.4}.yml, and the release CI workflows.
  • Sphinx .md/.rst sources removed; MyST directives ({note}, etc.) converted to MDX components (<Note>, …); internal links rewritten to Fern path format.
  • The former docs/releases/ pages were redistributed into the IA (about/release-notes/, troubleshooting/, resources/contributing/).

Conformance

Template-conformance checked (docs/fern/CONFORMANCE-REPORT.md): 0 true errors across 124 pages. (37 flagged items are a known tpl-lint false-positive on # inside code fences — tracked separately.)

Scope

Excludes docs/apidocs/ (autodoc2) and 3rdparty/ per the agreed scope; focuses the hand-authored docset.

Status — DRAFT

Branch is currently based on a80ae1c6; needs a rebase onto current main before un-drafting. Opened for review/visibility.

@copy-pr-bot

copy-pr-bot Bot commented Jun 8, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@chenopis chenopis self-assigned this Jun 8, 2026
@chenopis chenopis added docs-only With great power comes great responsibility. docs Documentation-only updates or documentation debt and removed docs-only With great power comes great responsibility. labels Jun 8, 2026
@chenopis
chenopis force-pushed the docs/fern-mdx-migration branch from b95fd1e to eed36b0 Compare June 8, 2026 13:07
@chenopis chenopis added the docs-only With great power comes great responsibility. label Jun 8, 2026
@chenopis
chenopis force-pushed the docs/fern-mdx-migration branch from eed36b0 to 328658e Compare June 8, 2026 13:13
@chenopis
chenopis requested a review from lbliii June 8, 2026 13:13
@chenopis
chenopis force-pushed the docs/fern-mdx-migration branch from 48dced7 to 9c030ac Compare June 8, 2026 19:09
chenopis added 4 commits June 15, 2026 10:33
De-risk commit: capturing the stranded working-tree migration state
(114 deletions of Sphinx/MyST .md, 56 modified, 124 .mdx authored, docs/fern/
infra present). Checkpoint only — completeness + template-conformance pass
not yet verified; not for merge as-is.

Signed-off-by: Andrew Chen <andrewch@nvidia.com>
…ance report

- Add docs/fern/versions/v0.4.yml mirroring nightly.yml navigation for the
  v0.4.x / NeMo Framework 26.04 stable release (latest git tag: v0.4.2).
  Version source: git tags (v0.4.2 is latest stable) + package_info.py MAJOR=0
  MINOR=4 at time of migration. Display name "v0.4 (26.04)" aligns the
  Megatron-Bridge semver with the NeMo Framework container release label used
  in software-versions.mdx.
- Register the v0.4 version in docs/fern/docs.yml alongside Nightly.
- Add docs/fern/CONFORMANCE-REPORT.md: tpl-lint sweep of all 124 MDX pages.
  Findings: 0 true errors; 37 uniform false-positives (duplicate_h1 from
  code-block comment lines — known tpl-lint limitation); warnings are
  orphan_heading style advisories only.


Signed-off-by: Andrew Chen <andrewch@nvidia.com>
The page was relocated to docs/training/ but kept images/X relative refs, which
resolved to docs/training/images/ (unrelated assets) instead of the shared
docs/images/. Repath the 6 refs to ../images/X, matching sibling training pages'
convention for shared images. fern check now reports 0 errors.

Signed-off-by: Andrew Chen <andrewch@nvidia.com>
fern docs dev failed to parse 3 files (defects fern check missed):
- nemo2-to-megatron-bridge.mdx + training/performance-tuning.mdx: un-converted
  HTML comments (<!-- -->) -> MDX comment syntax ({/* */}).
- training/hierarchical-context-parallel.mdx: raw <= read as a JSX tag -> escaped (\<=).
Verified: all 124 MDX compile clean via @mdx-js/mdx batch compile.

Signed-off-by: Andrew Chen <andrewch@nvidia.com>
@chenopis
chenopis force-pushed the docs/fern-mdx-migration branch from d5edbb4 to 86b790d Compare June 15, 2026 17:37
MDX parses {...} as a JS expression, so the unconverted Sphinx/MyST role {py:class}`...` broke the Fern docs build (acorn parse error on training/mixed-precision.mdx). Drop the role wrapper, keep the code span. This was the only remaining {role}`...` / :role:`...` instance in the migration (verified by scan); the preview now builds (126 pages).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@chenopis

Copy link
Copy Markdown
Contributor Author

📄 Fern docs preview — built from a36c7c4d via fern generate --docs --preview:

https://nvidia-preview-5c49bfad-f2fa-4330-9e3f-c1cd3205ae02.docs.buildwithfern.com/nemo/megatron-bridge

126 pages, nvidia global theme applied. (Fern preview URLs are ephemeral and will expire — the durable, per-PR preview comes from the CI workflows being added in FW-CI-templates#485: _fern_docs_preview_build + _fern_docs_preview_comment.)

Build-fix in a36c7c4d: the Sphinx→MDX migration left one unconverted MyST role — {py:class} in training/mixed-precision.mdx. MDX parses {…} as a JS expression, so it failed the build with an acorn parse error. Converted it to a plain code span. Verified it was the only remaining {role}/:role: instance in the migration; the preview now builds clean.

@cuichenx cuichenx added area:misc Cross-cutting utilities, logging, helpers, and other changes and removed docs-only With great power comes great responsibility. labels Sep 21, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:misc Cross-cutting utilities, logging, helpers, and other changes docs Documentation-only updates or documentation debt

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants