[Docs] Rename docs_new/ to docs/ (#32123)

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
zijiexia
2026-08-03 16:51:00 -07:00
committed by GitHub
co-authored by Claude Opus 4.8
parent c949e91f18
commit b819d2fb5b
491 changed files with 122 additions and 102 deletions
+13 -13
View File
@@ -1,6 +1,6 @@
---
name: cookbook-add-model
description: Add a new model to the SGLang Cookbook (docs_new/, Mintlify), config-driven format — instantiate the model-agnostic template into a per-model config (+ benchmarks) JSX under src/snippets/configs/, an MDX page, the docs.json nav entry, NEW-tag hygiene, and the homepage vendor card. Interactive, multi-phase. Run with /cookbook-add-model.
description: Add a new model to the SGLang Cookbook (docs/, Mintlify), config-driven format — instantiate the model-agnostic template into a per-model config (+ benchmarks) JSX under src/snippets/configs/, an MDX page, the docs.json nav entry, NEW-tag hygiene, and the homepage vendor card. Interactive, multi-phase. Run with /cookbook-add-model.
disable-model-invocation: true
---
@@ -12,16 +12,16 @@ disable-model-invocation: true
> page (not the user) is the source of truth.
The cookbook is **config-driven**: two shared engines contain NO model-specific code —
`docs_new/src/snippets/_deployment.jsx` (the 5-dim deploy matrix) and
`docs/src/snippets/_deployment.jsx` (the 5-dim deploy matrix) and
`_playground.jsx` (the diff-based override Playground). Adding a model = adding **data**:
a per-model `config` (+ optional `benchmarks`) consumed by both engines, plus an MDX page
that imports them. No engine edits.
**Instantiate the model-agnostic template** (NOT a clone of any live cookbook — the
template is decoupled and covers all hardware + all axes):
- `templates/config.jsx.tmpl` → `docs_new/src/snippets/configs/<hf-org>/<model-slug>.jsx`
- `templates/config.jsx.tmpl` → `docs/src/snippets/configs/<hf-org>/<model-slug>.jsx`
- `templates/benchmarks.jsx.tmpl` → `…/<model-slug>-benchmarks.jsx` (skip if no numbers)
- `templates/page.mdx.tmpl` → `docs_new/cookbook/<category>/<Vendor>/<ModelName>.mdx`
- `templates/page.mdx.tmpl` → `docs/cookbook/<category>/<Vendor>/<ModelName>.mdx`
The template uses explicit `__TOKEN__` placeholders; you fill them, prune what the model
lacks, and replace the EXAMPLE cells with verified recipes. DeepSeek-V4 is a populated
@@ -156,26 +156,26 @@ this table (RTX PRO 6000, GH200, future chips) goes in the model's own `config.h
### Site-wiring (do all three)
- **`docs_new/docs.json`** — add the page under Cookbook → `<category>` → `<Vendor>`, at
- **`docs/docs.json`** — add the page under Cookbook → `<category>` → `<Vendor>`, at
the **top** of that vendor's `pages` (root-relative, no `.mdx`:
`cookbook/<category>/<Vendor>/<Model>`). New vendor group → insert in the section's
local ordering.
- **NEW-tag hygiene** — the new page keeps `tag: NEW` (from the template). Scan the
vendor dir for existing NEW and strip it from siblings; verify ≤1:
`grep -rn 'tag: NEW' docs_new/cookbook/<category>/<Vendor>/` → at most one result. (Scan
`grep -rn 'tag: NEW' docs/cookbook/<category>/<Vendor>/` → at most one result. (Scan
files; don't assume the first `docs.json` entry holds NEW.)
- **Homepage card** — `docs_new/cookbook/<category>/intro.mdx`: if the org already has a
- **Homepage card** — `docs/cookbook/<category>/intro.mdx`: if the org already has a
`<Card>`, update only its `href` (keep `img`). If the org is **new**, add a `<Card>`
(title = nav-group name; keep card order aligned with `docs.json`) **and create its logo**:
ask the user for the brand logo, then generate the conforming **icon-only 940×525 RGBA
transparent** PNG → `docs_new/cards/logos/<org-slug>.png` per
transparent** PNG → `docs/cards/logos/<org-slug>.png` per
[references/vendor-logo.md](references/vendor-logo.md) (track with `git add -f` — `*.png`
is gitignored repo-wide). Never invent or copy a logo.
## Phase 3 — Validate
```bash
cd docs_new
cd docs
mint validate # frontmatter, missing nav entries, MDX/JSX errors
mint broken-links
mint dev # visual smoke test at http://localhost:3000/cookbook/<category>/<Vendor>/<Model>
@@ -218,10 +218,10 @@ Always branch — never commit to main directly.
```bash
git checkout -b add-<model>-cookbook
git add docs_new/src/snippets/configs/<hf-org>/<slug>.jsx \
docs_new/src/snippets/configs/<hf-org>/<slug>-benchmarks.jsx \
docs_new/cookbook/<category>/<Vendor>/<Model>.mdx \
docs_new/docs.json docs_new/cookbook/<category>/intro.mdx
git add docs/src/snippets/configs/<hf-org>/<slug>.jsx \
docs/src/snippets/configs/<hf-org>/<slug>-benchmarks.jsx \
docs/cookbook/<category>/<Vendor>/<Model>.mdx \
docs/docs.json docs/cookbook/<category>/intro.mdx
git commit -m "Add <Display-Name> cookbook"
git push -u origin add-<model>-cookbook
gh pr create --title "Add <Display-Name> cookbook" --body "..."
@@ -4,8 +4,8 @@ Loaded on demand by the `cookbook-add-model` skill. This is the field-by-field
contract for when the clone needs more than a rename. The two engine files are
the canonical specs — read their headers first:
- [`_deployment.jsx`](../../../../docs_new/src/snippets/_deployment.jsx) — the matrix widget; its header lists every config field. Dimensions are the legacy fixed five by default, or config-declared via `matchDims` / `overlayDims` (§2.1b).
- [`_playground.jsx`](../../../../docs_new/src/snippets/_playground.jsx) — the diff-based override widget; lists the `playgroundFeatures` axes + the `AXIS_HANDLERS` interface.
- [`_deployment.jsx`](../../../../docs/src/snippets/_deployment.jsx) — the matrix widget; its header lists every config field. Dimensions are the legacy fixed five by default, or config-declared via `matchDims` / `overlayDims` (§2.1b).
- [`_playground.jsx`](../../../../docs/src/snippets/_playground.jsx) — the diff-based override widget; lists the `playgroundFeatures` axes + the `AXIS_HANDLERS` interface.
Engine extension (adding a new playground axis) lives in [engine-axis.md](engine-axis.md).
@@ -13,7 +13,7 @@ Engine extension (adding a new playground axis) lives in [engine-axis.md](engine
## 2.1 Create the config file
**Path**: `docs_new/src/snippets/configs/<vendor>/<model>.jsx`. The vendor folder is
**Path**: `docs/src/snippets/configs/<vendor>/<model>.jsx`. The vendor folder is
the HuggingFace org (`deepseek-ai`, `Qwen`, `moonshotai`, ...); the file
name is a short hyphenated model id (`deepseek-v4`, `qwen3.5`, ...).
@@ -217,7 +217,7 @@ schemas (full reference in the `_playground.jsx` header):
## 2.4 Create the MDX page
Path: `docs_new/cookbook/<category>/<Vendor>/<Model>.mdx`. Import both widgets and
Path: `docs/cookbook/<category>/<Vendor>/<Model>.mdx`. Import both widgets and
the per-model config, render them inside the relevant sections:
```mdx
@@ -1,7 +1,7 @@
# Vendor card logo (new brand only)
A new vendor/brand in the cookbook landing grid needs a card logo at
`docs_new/cards/logos/<org-slug>.png`. **Ask the user for the brand's logo, then generate
`docs/cards/logos/<org-slug>.png`. **Ask the user for the brand's logo, then generate
the conforming PNG** — never invent, copy, or hallucinate one, and never ship a
non-conforming file. Reference: PR #27400 (added `tencent.png` + `poolside.png`).
@@ -11,7 +11,7 @@ If the org already has a card/logo, do nothing here — only update the `<Card h
| Property | Value |
|---|---|
| Path | `docs_new/cards/logos/<org-slug>.png` — lowercase, matches the `img=` in the `<Card>` |
| Path | `docs/cards/logos/<org-slug>.png` — lowercase, matches the `img=` in the `<Card>` |
| Canvas | **940 × 525** px |
| Mode | **RGBA**, fully **transparent** background |
| Content | **Icon-only** — the brand glyph/mark (the "swirl"), **no wordmark text** |
@@ -47,7 +47,7 @@ scale = target_h / src.height
glyph = src.resize((round(src.width * scale), target_h), Image.LANCZOS)
canvas = Image.new("RGBA", (W, H), (0, 0, 0, 0)) # transparent
canvas.paste(glyph, ((W - glyph.width) // 2, (H - glyph.height) // 2), glyph)
canvas.save("docs_new/cards/logos/<org-slug>.png")
canvas.save("docs/cards/logos/<org-slug>.png")
```
Notes:
@@ -60,7 +60,7 @@ Notes:
## 3. Verify
```bash
sips -g pixelWidth -g pixelHeight -g hasAlpha docs_new/cards/logos/<org-slug>.png
sips -g pixelWidth -g pixelHeight -g hasAlpha docs/cards/logos/<org-slug>.png
# → pixelWidth: 940 pixelHeight: 525 hasAlpha: yes
```
@@ -71,6 +71,6 @@ sips -g pixelWidth -g pixelHeight -g hasAlpha docs_new/cards/logos/<org-slug>.pn
# <Card title="<NavGroup>" mode="card"
# href="/cookbook/<category>/<Vendor>/<Model>"
# img="/cards/logos/<org-slug>.png" />
git add -f docs_new/cards/logos/<org-slug>.png # root .gitignore ignores *.png repo-wide
cd docs_new && mint validate && mint broken-links # confirms the card href + img resolve
git add -f docs/cards/logos/<org-slug>.png # root .gitignore ignores *.png repo-wide
cd docs && mint validate && mint broken-links # confirms the card href + img resolve
```
@@ -1,5 +1,5 @@
// TEMPLATE — instantiate via the cookbook-add-model skill. NOT a live cookbook.
// Copy to docs_new/src/snippets/configs/<hf-org>/<model-slug>-benchmarks.jsx and
// Copy to docs/src/snippets/configs/<hf-org>/<model-slug>-benchmarks.jsx and
// fill measured numbers — OR delete this file entirely if you have none yet (the
// MDX simply omits the `benchmarks` import/prop).
//
@@ -1,5 +1,5 @@
// TEMPLATE — instantiate via the cookbook-add-model skill. NOT a live cookbook.
// Copy to docs_new/src/snippets/configs/<hf-org>/<model-slug>.jsx, then:
// Copy to docs/src/snippets/configs/<hf-org>/<model-slug>.jsx, then:
// 1. replace every __TOKEN__,
// 2. fill cells[] with your verified recipes (the examples below show the shape),
// 3. DELETE the hardware / playground axes / quantizations your model lacks.