You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: rust-rewrite/docs-site-strategy.md
+61-16Lines changed: 61 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,15 +2,16 @@
2
2
3
3
## Recommendation
4
4
5
-
Keep the product docs and the landing page as separate surfaces:
5
+
Build the product docs and landing page as one Vercel-hosted Next.js site:
6
6
7
-
-`docs/`: Mintlify documentation source of truth.
8
-
-`site/`: Vercel-hosted Next.js landing page.
7
+
-`site/`: Vercel-hosted Next.js app for the landing page and statically rendered docs.
8
+
-`site/content/docs/`: target long-term docs content source, migrated from the current `docs/` tree.
9
+
-`site/lib/docs/` and `site/components/docs/`: target docs loader, navigation, search index generation, and MDX component shims.
9
10
-`rust-rewrite/skill-prototype/graph-sitter/`: draft Codex skill artifact until the package and docs are release-ready.
10
11
11
-
The landing page should explain Graph-sitter in one screen and route users to the docs. The docs should carry setup, CLI, API, Rust backend, JS/TS, codemod, correctness, and benchmark details. This avoids coupling generated API reference pages and long-form guides to a small marketing app.
12
+
The landing page should explain Graph-sitter in one screen. The docs should live in the same app under static routes and carry setup, CLI, API, Rust backend, JS/TS, codemod, correctness, and benchmark details. This gives us full control over layout, search, examples, interactive demos, custom benchmarking views, and future skill distribution pages.
12
13
13
-
If the team later decides "docs site on Vercel" means moving docs rendering off Mintlify, treat that as a separate migration. The likely path would be a docs app under `site/docs` or `apps/docs` using MDX, with a scripted import from `docs/`. Do not start there unless Mintlify becomes a blocker.
14
+
Mintlify should be treated as the legacy docs source/renderer, not the target platform. Keep the current `docs/` content as migration input until the Next docs renderer has parity, then retire Mintlify-specific config and CI.
14
15
15
16
## Current Repo Signals
16
17
@@ -29,9 +30,10 @@ If the team later decides "docs site on Vercel" means moving docs rendering off
29
30
Recommended public URLs:
30
31
31
32
```text
32
-
https://graph-sitter.com -> Vercel landing app rooted at site/
33
+
https://graph-sitter.com -> Vercel Next app landing page
Use `generateStaticParams` and `dynamicParams = false` for docs routes so Vercel pre-renders every docs page. A full static export can be evaluated later, but regular Vercel static generation is enough for launch and keeps room for future dynamic features such as hosted examples or generated benchmark views.
74
+
75
+
## Migration Plan From Mintlify
76
+
77
+
The current `docs/` tree is a useful content seed, but it contains Mintlify-specific navigation and MDX components. Migrate deliberately:
78
+
79
+
1. Inventory MDX component usage in `docs/**/*.mdx`.
80
+
2. Implement local component shims in `site/components/docs/` for high-use components such as `Note`, `Card`, `CardGroup`, `Param`, `ResponseField`, and code blocks.
81
+
3. Convert `docs/mint.json` navigation into a typed `site/content/nav.ts` or `site/content/nav.json`.
82
+
4. Move or copy content into `site/content/docs/` so the Vercel project is self-contained.
83
+
5. Add a build-time docs loader that parses frontmatter, resolves slugs, renders MDX, and emits a search manifest.
84
+
6. Port generated API reference pages or replace them with a generator that writes Vercel-compatible MDX.
85
+
7. Add redirects from old slugs to new slugs before domain cutover.
86
+
8. Remove Mintlify CI only after Next docs build proves parity on all docs pages.
87
+
88
+
Do not depend on files outside `site/` at Vercel build time unless the project root is deliberately changed to the repository root. The lower-risk target is a self-contained `site/` app with docs content underneath `site/content/docs/`.
89
+
59
90
## Accuracy Contract For Docs
60
91
61
92
Setup docs must be explicit about three workflows:
Production Branch: integrator-approved trunk branch
132
163
```
133
164
134
-
No checked-in `vercel.json` is required for the current app if Vercel project settings define `site` as the root directory. Add `site/vercel.json` only if the project needs repo-portable settings such as redirects, headers, or pinned framework behavior.
165
+
No checked-in `vercel.json` is required for the current app if Vercel project settings define `site` as the root directory. Once docs move to Vercel, add `site/vercel.json` or Next redirects if needed for:
166
+
167
+
-`docs.graph-sitter.com` domain routing.
168
+
- old Mintlify slug redirects.
169
+
- canonical `/docs` paths.
170
+
- long-cache headers for generated static assets and search indexes.
135
171
136
172
Read-only/project setup checks:
137
173
@@ -165,7 +201,7 @@ Production cutover requires explicit approval:
165
201
166
202
- attach `graph-sitter.com` to the Vercel landing project
167
203
- attach or redirect `www.graph-sitter.com`
168
-
-keep `docs.graph-sitter.com`pointed at docs hosting
204
+
-attach or redirect `docs.graph-sitter.com`to the Vercel docs routes
169
205
- update `hatch.toml` documentation URL if final docs URL differs from current metadata
170
206
171
207
Do not run `vercel deploy --prod`, promote a deployment, or attach domains from a subagent task.
-[ ] Decide whether docs stay on Mintlify for launch or migrate to Vercel MDX. owner: unclaimed.
263
+
-[x] Decide whether docs stay on Mintlify for launch or migrate to Vercel MDX. owner: user. Result: target is Vercel/Next with statically rendered docs; Mintlify is legacy migration input.
264
+
-[x] Design the Vercel docs content tree under `site/content/docs`. owner: codex. Result: added typed seed docs content in `site/content/docs/pages.ts` plus route/nav helpers for static docs pages.
265
+
-[ ] Inventory Mintlify-specific MDX components used by `docs/**/*.mdx`. owner: unclaimed.
266
+
-[ ] Build local MDX component shims for the migrated docs renderer. owner: unclaimed.
267
+
-[ ] Convert `docs/mint.json` navigation into a Vercel docs nav source. owner: unclaimed.
268
+
-[x] Create a static docs route in the Next app with `generateStaticParams`. owner: codex. Result: `site/app/docs/[[...slug]]/page.tsx` prerenders `/docs` plus setup, uvx, Rust status, parity, benchmark, and TypeScript support pages with `dynamicParams = false`.
269
+
-[ ] Generate a static client-side search manifest for docs pages. owner: unclaimed.
270
+
-[ ] Port or regenerate API reference pages into Vercel-compatible MDX. owner: unclaimed.
271
+
-[ ] Add redirects for old Mintlify docs slugs before domain cutover. owner: unclaimed.
228
272
-[ ] Add a docs release gate checklist to `rust-rewrite/strategy.md` or keep this file as the docs ledger. owner: unclaimed.
229
273
-[x] Audit `docs/introduction/installation.mdx` against current `uv run`, `uv tool install`, and `uvx` behavior. owner: codex. Result: installation docs now distinguish installed tool, local source, published-package `uvx`, and branch-built wheel validation.
230
274
-[x] Add or update a dedicated `docs/cli/uvx.mdx` page with release-gated package guidance. owner: codex. Result: added `docs/cli/uvx.mdx` for parse, run, transform, backend, safety, `--subdir`, and release-gate workflows.
@@ -236,17 +280,17 @@ Rules:
236
280
237
281
-[ ] Review `site/app/page.tsx` copy for release-gated claims before the first public preview. owner: unclaimed.
238
282
-[ ] Add a landing-page CTA to the exact docs quickstart once the docs URL is final. owner: unclaimed.
239
-
-[] Verify `site` builds from a clean install with Node 22. owner: unclaimed.
283
+
-[x] Verify `site` builds from a clean install with Node 22. owner: codex. Result: `PATH="$HOME/.nvm/versions/node/v22.19.0/bin:$PATH" npm ci && npm run build` passed and generated the static docs route.
240
284
-[ ] Add landing-page screenshots or visual QA notes before production domain cutover. owner: unclaimed.
241
285
242
286
### Vercel
243
287
244
288
-[ ] Link or create the Vercel project with root directory `site`. owner: unclaimed.
245
289
-[ ] Pull preview env with `vercel pull --cwd site --environment=preview --yes`. owner: unclaimed.
246
-
-[ ] Run a preview deploy for review only. owner: unclaimed.
290
+
-[ ] Run a preview deploy for review only after the static docs route builds. owner: unclaimed.
247
291
-[ ] Record the preview URL in this file or the integrator thread. owner: unclaimed.
248
-
-[ ] Confirm `docs.graph-sitter.com`hosting before apex cutover. owner: unclaimed.
249
-
-[ ] Attach `graph-sitter.com`and `www.graph-sitter.com` only after explicit approval. owner: blocked-pending-approval.
292
+
-[ ] Confirm `docs.graph-sitter.com`routing to Vercel docs before apex cutover. owner: unclaimed.
293
+
-[ ] Attach `graph-sitter.com`, `www.graph-sitter.com`, and `docs.graph-sitter.com` only after explicit approval. owner: blocked-pending-approval.
250
294
251
295
### Skill
252
296
@@ -267,5 +311,6 @@ Rules:
267
311
268
312
-[ ] Ensure PyPI package metadata points to the final docs and landing URLs. owner: unclaimed.
269
313
-[ ] Ensure the public setup path does not claim `uvx graph-sitter ...` until clean package validation passes. owner: unclaimed.
270
-
-[x] Add a docs validation CI or release gate for `mintlify validate`. owner: codex. Result: `.github/workflows/docs-validate.yml` runs Mintlify validate and broken-link checks for docs changes.
314
+
-[ ] Replace Mintlify docs validation CI with a Next docs build/link validation gate after migration. owner: unclaimed.
315
+
-[x] Add a legacy docs validation CI or release gate for `mintlify validate`. owner: codex. Result: `.github/workflows/docs-validate.yml` runs Mintlify validate and broken-link checks for docs changes until Vercel docs replace it.
271
316
-[x] Add a site build CI or release gate for `npm --prefix site ci && npm --prefix site run build`. owner: codex. Result: `.github/workflows/site-build.yml` installs from `site/package-lock.json` and runs the Next.js production build for landing-site changes.
0 commit comments