Skip to content

[6.x] Sidecar - #15099

Open
jackmcdade wants to merge 7 commits into
6.xfrom
sidecar
Open

[6.x] Sidecar#15099
jackmcdade wants to merge 7 commits into
6.xfrom
sidecar

Conversation

@jackmcdade

@jackmcdade jackmcdade commented Aug 1, 2026

Copy link
Copy Markdown
Member

Summary

Experimental: Sidecar — a core framework for editing external markdown content (docs sites, SSGs) as Statamic collections in the Control Panel, in place, without importing or changing how the source system builds.

This PR ships the CMS portion only. Concrete adapters live in separate packages (statamic/sidecar-laradocs, statamic/sidecar-jigsaw, …).

Why

Teams already have content in LaraDocs, Jigsaw, etc. Sidecar lets them keep that filesystem contract and still get Statamic’s CP: blueprints, structure trees, Live Preview, permissions — pointed at the real files.

What’s in core

  • Sidecar manager + driver contract — packages register via Sidecar::extend() / Sidecar::pair(); collections are declared in config/statamic/sidecar.php
  • In-memory collection registrationCollection::register() so Sidecar collections don’t need a content/collections/*.yaml file (on-disk cascade data is still preserved when present)
  • Custom entry directories — collections can resolve entries from outside content/collections/{handle}
  • Nested-folder sync — drivers that opt in (usesNestedFolders()) rewrite paths from the structure tree (page.mdpage/_index.md, prune empty dirs, sync sibling order)
  • Install UXphp please sidecar:install detects paired SSG packages and scaffolds config
  • Live Preview without routesCollection::hasLivePreview() + driver previewUrl() so headless/Sidecar collections can still Visit / preview
  • Blueprint fallbacks — collections can supply a driver blueprint when none exist on disk
  • Removes path-slug experiment — nesting is real folders (or driver-owned nav), not slash-containing slugs

Driver packages (out of this PR)

Package Model
statamic/sidecar-laradocs Nested folders + _index.md + order FM
statamic/sidecar-jigsaw Flat source/docs/ + navigation.php as hierarchy

Example

// config/statamic/sidecar.php
'collections' => [
    'docs' => [
        'driver' => 'laradocs',
        'directory' => base_path('docs'),
    ],
],
composer require petebishwhip/laradocs statamic/sidecar-laradocs
php please sidecar:install laradocs
  • php please sidecar:install with no drivers / one detected package / multiple packages
  • Sidecar collection appears in CP without a collection YAML
  • Entries load from a custom directory; save preserves unknown front matter
  • Nested-folder driver: reorder/nest/unnest in Tree view relocates files, writes order, deletes empty dirs
  • Deleting a Sidecar collection does not wipe the external content directory
  • Live Preview / Visit URL works with previewTargets / driver previewUrl and no collection route
  • Multi-site: core still requires site folders; custom directories may store flat entries
  • Existing non-Sidecar collections/stache behavior unchanged
  • Run tests/Sidecar/*, tests/Data/Entries/CollectionTest, EntriesStoreTest, CollectionRepositoryTest

jackmcdade and others added 5 commits August 1, 2026 15:22
Driver packages now register SSG compatibility via Sidecar::pair(),
so install discovery no longer depends on a published config key.

Co-authored-by: Cursor <cursoragent@cursor.com>
Nested Sidecar content will use real folders instead of slash-containing
slugs, so PathSlug and preserve_paths are no longer needed.

Co-authored-by: Cursor <cursoragent@cursor.com>
Drivers can opt into folder-based nesting so structure changes rewrite
entry paths and sibling order instead of encoding hierarchy in slugs.

Co-authored-by: Cursor <cursoragent@cursor.com>
@statamic statamic deleted a comment from cursor Bot Aug 1, 2026
@jackmcdade
jackmcdade marked this pull request as draft August 1, 2026 23:07
Custom Closure/Blueprint fallbacks skipped the title contents update that the default path applied, so Sidecar and other custom fallbacks got inconsistent blueprint titles.

Co-authored-by: Cursor <cursoragent@cursor.com>
@jackmcdade
jackmcdade marked this pull request as ready for review August 2, 2026 17:20
Guard registerCustomDirectory when the entries store is missing, and update publish-array expectations for the textarea rows default.

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant