Statamic Sidecar driver for Jigsaw. Edit flat docs pages under source/docs/ in the Control Panel while keeping hierarchy in navigation.php.
composer require statamic/cms tightenco/jigsaw statamic/sidecar-jigsaw
php please sidecar:install jigsawOr add the collection manually in config/statamic/sidecar.php:
'collections' => [
'docs' => [
'driver' => 'jigsaw',
'directory' => base_path('source/docs'),
// 'navigation' => base_path('navigation.php'),
// 'url_prefix' => 'docs',
// 'site_url' => 'http://localhost:8000',
// 'preview_url' => 'http://localhost:8000/docs/{slug}',
],
],Meant for the Jigsaw docs template layout: markdown files in source/docs/ plus a root navigation.php.
- Registers a
docscollection pointed at your Jigsaw docs directory - Enables Tree mode in the CP for drag-and-drop nesting/order
- Keeps pages flat on disk (
source/docs/{slug}.md) — URLs staydocs/{slug} - Rewrites
navigation.phpwhen the structure tree changes - Seeds the CP tree from
navigation.phpon first boot (when no tree file exists yet) - Preserves external / manual nav links that aren't collection entries
- Ensures new pages get
extends+sectionfront matter so Jigsaw still builds - Visit URL via configurable
site_url+url_prefix - Live Preview via
!/sidecar/jigsaw/live-preview(WIP token rendering)
| Key | Default | Purpose |
|---|---|---|
directory |
base_path('source/docs') |
Markdown pages |
navigation |
base_path('navigation.php') |
Sidebar source of truth |
url_prefix |
docs |
URL segment written into nav |
site_url |
app url('/') |
Base for Visit URL |
preview_url |
action live-preview route | Override Live Preview target |
title |
driver title | Collection title override |
blueprint |
driver blueprint | Existing blueprint handle |
- Blog collections (
source/_posts/) - Nested folder layouts
- Auto-running
jigsaw buildon save - Full Blade layout/
extendsrendering in Live Preview (markdown body + nav only)
MIT