Skip to content

Instantly share code, notes, and snippets.

@jasonvarga
Created May 24, 2016 22:01
Show Gist options
  • Save jasonvarga/80248d401cdc1d22b2ed1cb73dcd880d to your computer and use it in GitHub Desktop.
Save jasonvarga/80248d401cdc1d22b2ed1cb73dcd880d to your computer and use it in GitHub Desktop.
Statamic Docs

Statamic Documentation

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.

Folder structure

/
|— /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.

Leveraging Filesystems

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.

Deploy Process

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment