This repository contains the Pantheon documentation, as well as the tools to build local test environments.
- 8/5/19: We've relaunched the project using Gatsby for faster development, and much faster page speed.
Our docs are written in Markdown, extended with MDX components. The pages live in source/content
. Read CONTRIBUTING.md for more details on contributing documentation improvements.
Read our Style Guide for our guidelines on how to write documentation.
-
MacOS or Linux system (untested with Bash on Windows)
-
Gatsby CLI:
npm install -g gatsby-cli
Fork and clone this repository.
git clone https://github.com/pantheon-systems/documentation.git
Or
[email protected]:pantheon-systems/documentation.git
cd documentation/gatsby
npm install
We use the gatsby-remark-embed-snippet to use files from GitHub in our docs. Before you can build a local development site, you need to provide a GitHub token to the environment:
-
Log in to GitHub and go to https://github.com/settings/tokens
-
Click Generate new token
-
Give it a name and click the public_repo checkbox, then the Generate Token button at the bottom
-
Copy the token to your clipboard.
-
Create or edit
gatsby/.env.development
, and add (replacing $TOKENHASH ):GITHUB_API=$TOKENHASH
cd documentation/gatsby
gatsby develop
You can view the local environment at localhost:8000/
. Updates to docs are automatically refreshed in the browser.
We include several tools to test that new content doesn't break the documentation. Most of these tests are performed automatically by our continuous integration service, but pull requests created from external contributors aren't included in CI tests. If you want to manually test your branch, you can execute the following tests within the Docker container.
To check for merge conflict messages accidentally committed into the docs, run merge_conflicts.sh
from scripts
.