Created
April 5, 2024 08:20
-
-
Save hgrimelid/3bac58c78b975b5fd195fdc31caaedc2 to your computer and use it in GitHub Desktop.
Statamic Stache - store content outside repo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* Requires config setting `custom.content_path` to be set | |
*/ | |
return [ | |
/* | |
|-------------------------------------------------------------------------- | |
| File Watcher | |
|-------------------------------------------------------------------------- | |
| | |
| File changes will be noticed and data will be updated accordingly. | |
| This can be disabled to reduce overhead, but you will need to | |
| either update the cache manually or use the Control Panel. | |
| | |
*/ | |
'watcher' => env('STATAMIC_STACHE_WATCHER', true), | |
/* | |
|-------------------------------------------------------------------------- | |
| Stores | |
|-------------------------------------------------------------------------- | |
| | |
| Here you may configure the stores that are used inside the Stache. | |
| | |
| https://statamic.dev/stache#stores | |
| | |
*/ | |
'stores' => [ | |
'taxonomies' => [ | |
'directory' => base_path('content/taxonomies'), | |
], | |
'terms' => [ | |
'directory' => base_path(config('custom.content_path') . 'taxonomies'), | |
], | |
'collections' => [ | |
'directory' => base_path('content/collections'), | |
], | |
'entries' => [ | |
'directory' => base_path(config('custom.content_path') . 'collections'), | |
], | |
'navigation' => [ | |
'directory' => base_path('content/navigation'), | |
], | |
'collection-trees' => [ | |
'directory' => base_path(config('custom.content_path') . 'trees/collections'), | |
], | |
'nav-trees' => [ | |
'directory' => base_path(config('custom.content_path') . 'trees/navigation'), | |
], | |
'globals' => [ | |
'directory' => base_path(config('custom.content_path') . 'globals'), | |
], | |
'global-variables' => [ | |
'directory' => base_path(config('custom.content_path') . 'globals'), | |
], | |
'asset-containers' => [ | |
'directory' => base_path('content/assets'), | |
], | |
'users' => [ | |
'directory' => base_path(config('custom.content_path') . 'users'), | |
], | |
], | |
/* | |
|-------------------------------------------------------------------------- | |
| Indexes | |
|-------------------------------------------------------------------------- | |
| | |
| Here you may define any additional indexes that will be inherited | |
| by each store in the Stache. You may also define indexes on a | |
| per-store level by adding an "indexes" key to its config. | |
| | |
*/ | |
'indexes' => [ | |
// | |
], | |
/* | |
|-------------------------------------------------------------------------- | |
| Locking | |
|-------------------------------------------------------------------------- | |
| | |
| In order to prevent concurrent requests from updating the Stache at | |
| the same and wasting resources, it will be "locked" so subsequent | |
| requests will have to wait until the first has been completed. | |
| | |
| https://statamic.dev/stache#locks | |
| | |
*/ | |
'lock' => [ | |
'enabled' => true, | |
'timeout' => 30, | |
], | |
]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment