This website is built using Docusaurus 2, a modern static website generator.
$ yarn
$ yarn start
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
$ yarn build
This command generates static content into the build
directory and can be served using any static contents hosting service.
Using SSH:
$ USE_SSH=true yarn deploy
Not using SSH:
$ GIT_USER=<Your GitHub username> yarn deploy
If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the gh-pages
branch.
This repo is checked using pre-commit
as part of any Pull Requests that are opened on it. To ensure that your changes comply with the rules and checks put in place, make sure you have run pre-commit install
at least once after checking out this repo. Before you commit the hook will run some checks and prevent you from committing unless you fix the issues. Some checks may modify a file, simply re-stage it and try the commit again. If you want to run the checks manually simply run pre-commit run -a
to run them on the entire repo.
The checks in place are:
- JSON Formatting checks
- Merge conflict checks
- AWS Credential check
- Detect Private Keys
- EOF Fixer
- No committing to Master/Main
- Trailing whitespaces
- Prettier formatting
- Markdown Lint
- Ensure documents are tagged, have a description and ID
- Prevent commit message reuse
- Word Veto
The last one is being used to set a standard for how things should be spelled, capitalized, etc. Spelling inside of fenced code blocks
and URLs is exempted. Add a word veto to .pre-commit-config.yaml, push, and following commits will automatically adjust the veto'd words.
Run this command once:
$ pip install pre-commit && pre-commit install
- Only run
yarn build
in /prophecy-docs rather than subdirectories. This avoids caching extra copies of the package management files. - If
yarn build
is slow, tryrm -rf .docusaurus/ node_modules
, then runyarn
and thenyarn build
again. - If you want to check that redirects are working without relying on
yarn build
, runyarn global add serve
thenserve
. This brings up the files on localhost:3000 in an approximation of the live site.