superinteractive / statamic-super-documentation
Serve VitePress documentation behind the Statamic CP.
Package info
github.com/superinteractive/statamic-super-documentation
Type:statamic-addon
pkg:composer/superinteractive/statamic-super-documentation
Requires
- php: ^8.4
- laravel/framework: ^10.0 || ^11.0 || ^12.0 || ^13.0
- statamic/cms: ^5.0 || ^6.0
Requires (Dev)
- pestphp/pest: ^2.0 || ^3.0 || ^4.0
This package is auto-updated.
Last update: 2026-06-08 10:06:35 UTC
README
A Statamic 5 and 6 addon that serves VitePress-built documentation behind the Statamic Control Panel's authenticated routes.
Installation
1. Require the addon
composer require superinteractive/statamic-super-documentation
2. Install VitePress
npm install --save-dev vitepress
3. Build the documentation
npm run docs:build
4. Publish the config (optional)
php artisan vendor:publish --tag=super-documentation-config
Local Development
When developing this package with the Super Statamic Starter Kit source app, work from the package repository:
cd Packages/statamic-super-documentation
The Control Panel assets are powered by Vite. During development, run:
npm install npm run build
Configuration
Published to config/statamic/super-documentation.php:
| Key | Type | Default | Description |
|---|---|---|---|
docs_source_path |
string |
'resources/docs/src' |
Path to VitePress source (relative to project root) |
docs_dist_path |
string |
'resources/docs/dist' |
Path to VitePress build output (relative to project root) |
button_label |
string |
'Documentation' |
Text shown on the CP header button |
Writing Documentation
Documentation source files live at resources/docs/src/ (configurable). Add Markdown files following VitePress conventions.
Local preview
npm run docs:dev
Build for production
npm run docs:build
VitePress Base Path
The VitePress base in .vitepress/config.ts must match the Statamic CP route prefix. The default is /cp/documentation/. If your CP route is changed via the CP_ROUTE environment variable, update the base accordingly and rebuild.