superinteractive/statamic-super-documentation

Serve VitePress documentation behind the Statamic CP.

Maintainers

Package info

github.com/superinteractive/statamic-super-documentation

Type:statamic-addon

pkg:composer/superinteractive/statamic-super-documentation

Statistics

Installs: 6

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v1.0.0 2026-06-08 10:05 UTC

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.