diff --git a/.vitepress/config.ts b/.vitepress/config.ts index 6eeeb16a..fcb75377 100644 --- a/.vitepress/config.ts +++ b/.vitepress/config.ts @@ -34,6 +34,7 @@ export default ({ mode }: { mode: string }) => { srcExclude: [ '**/guide/examples/*', '**/guide/cli-generated.md', + 'AGENTS.md', ], locales: { root: { @@ -558,6 +559,10 @@ export default ({ mode }: { mode: string }) => { text: 'projects', link: '/config/projects', }, + { + text: 'sharedViteServer', + link: '/config/sharedviteserver', + }, { text: 'isolate', link: '/config/isolate', diff --git a/.vitepress/sponsors.ts b/.vitepress/sponsors.ts index cabc256b..0c9ca091 100644 --- a/.vitepress/sponsors.ts +++ b/.vitepress/sponsors.ts @@ -67,6 +67,11 @@ export const sponsors: SponsorTier[] = [ url: 'https://aerius.se/', img: '/aerius.png', }, + { + name: 'TestMu AI', + url: 'https://www.testmuai.com/?utm_medium=sponsor&utm_source=vitest-dev', + img: '/testmuai.svg', + }, ], }, ] diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 00000000..fc4d8310 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,26 @@ +# Vitest Docs Guide + +Guidance for working on the VitePress site in `docs/`. The root `AGENTS.md` applies here too. + +## Building + +- Local dev server: `pnpm docs` (from the repo root) +- Build with `pnpm docs:build` from the repo root; it sets the required env vars and regenerates the CLI table first +- The build type-checks code samples against the built workspace packages, so run `pnpm build` at the repo root first + +## What fails the build + +- Code blocks tagged `ts twoslash` are type-checked during `pnpm docs:build` only; the dev server skips twoslash and will not catch broken samples. A sample that intentionally fails needs `// @errors: `; use `// ---cut---` and `// @filename:` to hide setup lines. Changing public types in `packages/` can break twoslash samples. +- Dead internal links fail the build. Every CLI option gets a generated link to `/config/