We allow users to contribute to the Statamic docs. The content is stored separate from the actual site so our users view and modify content but the site can be hidden.
/
|— /docs.statamic.com
| |— statamic
| |— local
| |— site
| | |— addons
| | |— settings
| | `— themes
| `— index.php
|
`— /docs
|— assets
|— content
`— storage
The /docs folder is the statamic/docs repo.
Notice that there’s no site/content, site/storage, or assets folders in the main repo.
Statamic is built on Filesystems. By default we point content and storage where you expect. In our case, we just adjusted the locations to point to the other repo.
filesystems:
content:
driver: local
root: ‘../docs/content’
storage:
driver: local
root: ‘../docs/storage’
As for the assets, we actually just leave it as-is, and create a symlink from /docs.statamic.com/assets to /docs/assets.
Whenever something is pushed to the docs repo’s master branch, it gets pulled down to the docs folder.
We also update the search index by doing cd docs.statamic.com && php please search:update.