Skip to content

Comments

[docs] Add API reference to new docs site and cleanup old docs#1177

Merged
SumanthRH merged 14 commits intomainfrom
mkdocs-cleanup
Feb 19, 2026
Merged

[docs] Add API reference to new docs site and cleanup old docs#1177
SumanthRH merged 14 commits intomainfrom
mkdocs-cleanup

Conversation

@SumanthRH
Copy link
Member

@SumanthRH SumanthRH commented Feb 18, 2026

What does this PR do?

This PR integrates a MkDocs-based API reference into the Fumadocs (Next.js) documentation site, served at /api-ref/, and cleans up legacy documentation artifacts.

Changes

API Reference Site (MkDocs + mkdocstrings)

  • Added auto-generated Python API reference pages at /api-ref/ using MkDocs Material + mkdocstrings
  • Nested all MkDocs config and content under docs/mkdocs/ (previously scattered in skyrl-train/)
  • Removed old Sphinx/RST documentation files
  • API reference covers:
    • SkyRL — Backends (Abstract, JAX, SkyRL-Train), Tinker Engine, Types, TX Models
    • SkyRL-Train — Data Interface, Generator, Trainer, Entrypoint, Algorithm Registry, Environment Variables
    • SkyRL-Gym — Environment, Tools

Routing & Embedding

  • Added Next.js middleware to rewrite /api-ref/* requests to static MkDocs HTML files
  • Used per-page tag in MkDocs template override to ensure asset paths, sidebar links, and TOC anchor links all resolve correctly
  • Added "API Reference" link to Fumadocs navbar and "Back to Docs" link in the API reference sidebar

Build & Dependencies

  • Added mkdocstrings[python] and pymdown-extensions to root pyproject.toml dev dependencies
  • Updated docs/package.json build script to run MkDocs from the repo root
  • Created skyrl/tinker/__init__.py so griffe can discover the tinker package
  • JAX backend pages use allow_inspection: false to avoid conflicting dependency issues. Better documentation for the jax backend will be added in a follow-up PR
Screen.Recording.2026-02-18.at.4.16.14.PM.2.mov

Open with Devin

SumanthRH and others added 10 commits February 5, 2026 09:38
Signed-off-by: SumanthRH <sumanthrh99@gmail.com>
Signed-off-by: SumanthRH <sumanthrh99@gmail.com>
x
Signed-off-by: SumanthRH <sumanthrh99@gmail.com>
x
Signed-off-by: SumanthRH <sumanthrh99@gmail.com>
- Switch to Inter font, white primary palette, blue accent
- Override header: white background with thin border-bottom
- Override tabs: subtle, no colored background
- Lighter sidebar with more spacing
- Minimal footer (copyright only, no prev/next nav)
- Fumadocs-style tables, subtler admonitions, rounded code blocks
- Full dark mode support throughout

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add mkdocs.embed.yaml for API-only MkDocs build (docs_dir: new_docs/api)
- Add Next.js middleware for /api-ref trailing slash + index.html resolution
- Update next.config.mjs with skipTrailingSlashRedirect
- Update package.json build script to chain mkdocs build → next build
- Update vercel.json to install uv during Vercel build
- Add API Reference nav link in fumadocs layout
- Add API reference landing page (api/index.md)
- Gitignore build artifacts (docs/public/api-ref/)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Delete skyrl-train/docs/ (old Sphinx RST, fully migrated)
- Delete skyrl-train/new_docs/ user guide content (duplicates fumadocs)
- Delete skyrl-train/mkdocs.yaml (standalone config, no longer needed)
- Move MkDocs API ref source files to docs/mkdocs/
- Fix /api-ref routing with <base> tag instead of redirect (avoids loops)
- Add "Back to Docs" link in API reference sidebar
- Update build scripts, README, .readthedocs.yaml, .gitignore

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
# Conflicts:
#	docs/lib/layout.shared.tsx
#	skyrl-train/docs/algorithms/custom_algorithms.rst
#	skyrl-train/docs/configuration/config.rst
#	skyrl-train/docs/examples/flash_rl.rst
#	skyrl-train/uv.lock
Add API reference pages for the root skyrl/ package (backends, tinker
engine, types, TX models) and restructure nav under a "SkyRL" section.
Fix the <base> tag to be page-specific so TOC anchor links resolve
against the current page instead of always going to the index. Remove
non-existent extra_css reference and disable navigation.instant to
prevent anchor link breakage.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
x
Signed-off-by: SumanthRH <sumanthrh99@gmail.com>
@SumanthRH SumanthRH changed the title Add API reference to new docs site and cleanup old docs [docs] Add API reference to new docs site and cleanup old docs Feb 18, 2026
SumanthRH and others added 4 commits February 18, 2026 23:51
Append API Reference as the last item in the fumadocs sidebar page
tree instead of the top navbar. Simplify the API reference index page
by removing the description sentence and flattening SkyRL-Train entries.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
x
Signed-off-by: SumanthRH <sumanthrh99@gmail.com>
x
Signed-off-by: SumanthRH <sumanthrh99@gmail.com>
x
Signed-off-by: SumanthRH <sumanthrh99@gmail.com>
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request significantly refactors the documentation system by migrating from Sphinx to a hybrid approach using Fumadocs for the user guide and MkDocs for the API reference. Key changes include updating the .gitignore to reflect new build artifacts and explicitly include docs/lib, a complete rewrite of the docs/README.md to detail the new dual-system setup, development workflows, and deployment instructions, and the addition of a Next.js middleware (docs/middleware.js) to correctly route requests to the static MkDocs API reference pages under /api-ref/. Numerous new Markdown files (docs/mkdocs/content/*.md) were introduced to define the API reference structure, utilizing mkdocstrings directives to auto-generate content from Python code. The docs/mkdocs/mkdocs.yaml configures the MkDocs build process, theme, plugins, and navigation, while custom CSS (docs/mkdocs/content/stylesheets/custom.css) and HTML overrides (docs/mkdocs/overrides/main.html, docs/mkdocs/overrides/partials/footer.html) ensure visual consistency with Fumadocs. Build scripts in docs/package.json and docs/vercel.json were updated to orchestrate the uv, mkdocs, and next build commands, and pyproject.toml was modified to include necessary mkdocstrings and pymdown-extensions dependencies. Additionally, all old Sphinx-related documentation files and build scripts were removed. A review comment suggested simplifying the docs/middleware.js logic for better readability by combining conditional blocks for path rewriting.

Copy link
Contributor

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 6 additional findings.

Open in Devin Review

@SumanthRH SumanthRH merged commit 168b20f into main Feb 19, 2026
9 checks passed
@SumanthRH SumanthRH deleted the mkdocs-cleanup branch February 19, 2026 20:08
SumanthRH added a commit that referenced this pull request Feb 19, 2026
…etion

Upstream PR #1177 migrated docs to docs/mkdocs/ and deleted skyrl-train/docs/.
Accept the deletion and drop local SkyRLConfig→SkyRLTrainConfig renames in the
old RST files (new docs don't reference these).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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