Vitepress Site
Purpose
Provide a runnable VitePress demo site in docs/ that renders this project's own OpenSpec folder.
Requirements
Requirement: docs directory contains a runnable VitePress site
A docs/ directory SHALL exist at the repository root containing a complete VitePress site with its own package.json, .vitepress/config.ts, and at least one content page (index.md).
Local dev server starts
- WHEN
npm run docs:devis run from the repository root - THEN VitePress starts a local dev server without errors
Production build succeeds
- WHEN
npm run docs:buildis run from the repository root (afternpm run build) - THEN VitePress produces a
docs/.vitepress/dist/directory containingindex.html
Requirement: Site renders the project's own openspec folder
The VitePress config SHALL generate pages from the repository's openspec/ directory into docs/openspec/ using the plugin.
Spec and change pages are generated during build
- WHEN
npm run docs:buildcompletes - THEN
docs/.vitepress/dist/openspec/contains HTML pages for the specs index, each spec, and the changes index
Plugin references the local build
- WHEN
docs/package.jsonis inspected - THEN the plugin dependency references the local package via
file:../or equivalent workspace notation
Requirement: Site nav includes an OpenSpec entry
The VitePress themeConfig.nav SHALL contain an entry created with openspecNav() pointing to /openspec/.
Nav entry is present
- WHEN the built site's
index.htmlis inspected - THEN the navigation bar contains a link labelled "OpenSpec" pointing to the openspec section
Requirement: Root package.json exposes docs scripts
The root package.json SHALL contain docs:dev and docs:build scripts that delegate to the docs/ sub-package.
docs:build script exists
- WHEN
npm runis executed at the repo root - THEN both
docs:devanddocs:buildare listed as available scripts