Building
Getting the repo
If you are contributing to the repository, make sure to fork this repo, and then clone your own fork. You will need to do this to make creating pull requests easier.
git clone https://github.com/<your-username>/terra-docs
Test locally with Docker
Using Docker is easier than configuring your local machine to build sphinx
:
First build the local Docker container:
make docker-make
Then you're ready to build the site:
make docker-build
You can view the site in your browser by navigating to index.html
located in <PATH_TO_CLONED_REPO>/_build/html/index.html
.
Make sure to run make docker-build
each time you save your changes to view them live.
Adding an article
All articles are markdown files, placed under the /docs/
directory. You can create folders underneath the /docs
directory, such as the following:
/docs
/dev
README.md
spec-auth.md
...
/node
README.md
installation.md
...
README.md
Notice how README.md
serves as the default root of the folder.
Editing the navigation
To edit the navigation to include your new article, edit /docs/.vuepress/config.js
and add your new article in the appropriate section in themeConfig.sidebar
, following the other paths as examples.
Organization
Module Specs
Each module should be documented with the following subheaders:
-
Abstract (no header)
Maximum 2 paragraphs to explain, in broad terms, the general purpose of the module, to provide a "big-picture" perspective of how the module provides functionality and organization to the Terra protocol, and how it interacts with other modules.
-
Concepts
A section dedicated to the concepts that are required to understand how the module works. This may include:
- layman primer
- math formulas (formatted with LaTeX)
- diagrams
-
Data
A section that covers the various data structures used by the module.
-
State
A section that covers the keeper state for that module key-value store
-
Messages
A section that covers the various types of messages and gives a rough explanation on how they are handled.
-
Proposals
A section that covers the related governance proposals
-
Transitions
A section that covers the begin-blocker and end-blocker transition functions
-
Parameters
A section that covers the chain parameters that can be modified by governance via the
params
module
Built With
- Sphinx Book Theme
License
This software is licensed under the MIT license. See LICENSE for full disclosure.
© 2020 Terraform Labs, PTE.