superinteractive/statamic-super-documentation
Composer 安装命令:
composer require superinteractive/statamic-super-documentation
包简介
Serve VitePress documentation behind the Statamic CP.
README 文档
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.
统计信息
- 总下载量: 65
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-06-08