docs_new/docs_migration_plan.md
Migrate the new Mintlify-based documentation (currently in the standalone sgl-docs repo) into the sglang main repo under docs_new/, and point staging.docs.sglang.io to it.
| Item | Location | Stack | Domain |
|---|---|---|---|
| Old docs | sglang/docs/ | Sphinx + GitHub Pages | docs.sglang.io |
| New docs + cookbook | sgl-project/sgl-docs repo | Mintlify | lmsysorg.mintlify.app (temp preview) |
sgl-docs/cookbook/, no separate repo needed.execute-notebook.yml, lint.yml) only watches docs/**, will not be triggered by docs_new/**.Goal: Merge
sgl-docsintosglangrepo'sdocs_new/directory, preserving full commit history and authorship.
# 1. Create a new branch (sglang remote is NOT affected)
cd /path/to/sglang
git checkout -b docs-new-migration
# 2. Add sgl-docs as a remote (sgl-docs repo is NOT affected, read-only fetch)
git remote add sgl-docs [email protected]:sgl-project/sgl-docs.git
git fetch sgl-docs
# 3. Subtree merge — all sgl-docs content goes into docs_new/, full history preserved
git subtree add --prefix=docs_new sgl-docs main
# 4. Keep the remote for ongoing sync during migration period
# (remove only after sgl-docs is officially archived)
sgl-docs original repo: unaffected (fetch only, no push)sglang remote: unaffected (local branch, no push until ready)git checkout main && git branch -D docs-new-migrationgit subtree add (without --squash) imports all original commits. Authors from sgl-docs will appear in sglang's git history and GitHub Contributors list. This is intentional — it gives proper credit.
docs_new/ (on branch)Goal: Make Mintlify read from
sglangrepo'sdocs_new/subdirectory instead of the standalonesgl-docsrepo. No need to merge to main first — Mintlify can point to a specific branch for validation.
sgl-project/sgl-docs to sgl-project/sglangdocs-new-migration (temporarily, for validation)docs_new (Mintlify supports monorepo subdirectory)docs.json (Mintlify config) will be at docs_new/docs.json after the subtree merge — paths inside it (e.g., cookbook/llm/Qwen/Qwen3) are relative to docs_new/, so no changes neededstaging.docs.sglang.ioGoal: Make
staging.docs.sglang.ioserve the new Mintlify docs.
staging.docs.sglang.io pointing to Mintlify's endpoint (typically cname.mintlify.dev)staging.docs.sglang.iostaging.docs.sglang.io loads correctlyDuring the transition,
sgl-docsmay still receive updates. Sync them intodocs_new/as needed.
# Pull latest changes from sgl-docs into docs_new/
git subtree pull --prefix=docs_new sgl-docs main
Once sgl-docs is frozen, this step is no longer needed.
Current docs/** CI workflows will NOT trigger for docs_new/** changes. This is fine initially since Mintlify has its own GitHub integration for auto-deployment on push to main.
Optional additions later:
docs_new/**/*.mdxGoal: Promote staging to production.
| Stage | docs.sglang.io | staging.docs.sglang.io |
|---|---|---|
| After Phase 3 | Sphinx (old docs) | Mintlify (new docs) |
| After cutover | Mintlify (new docs) | Keep or remove |
Cutover steps:
staging.docs.sglang.io is stable and content-completedocs.sglang.io CNAME from GitHub Pages to Mintlify (cname.mintlify.dev)docs.sglang.iosglang/docs/ (old Sphinx docs).github/workflows/release-docs.yml and .github/workflows/execute-notebook.ymlsgl-project/sgl-docs repo on GitHubsgl-docs git remote: git remote remove sgl-docssgl-project/sgl-project.github.io repoMintlify supports pointing to a specific branch, so we can validate on
docs-new-migrationbefore merging to main.
| Step | Action | Who | Dependency |
|---|---|---|---|
| 1 | Phase 1: subtree merge on local branch | Dev | — |
| 2 | Push branch to sgl-project/sglang | Dev | Step 1 |
| 3 | Phase 2: configure Mintlify Dashboard to read from sgl-project/sglang branch docs-new-migration docs_new/ | Admin (Mintlify access) | Step 2 |
| 4 | Phase 3: DNS CNAME + Mintlify custom domain for staging.docs.sglang.io | Admin (DNS access) | Step 3 |
| 5 | Verify staging site | Team | Step 4 |
| 6 | Merge PR to main, switch Mintlify branch back to main | Dev + Admin | Step 5 confirmed OK |
| 7 | Phase 4: sync any remaining sgl-docs updates | Dev | As needed |
| 8 | Phase 6: final cutover when ready | Admin | Step 6 done |