|
|
@ -1,31 +1,69 @@ |
|
|
|
# Documentation Maintenance Overview |
|
|
|
# Docs Build Workflow |
|
|
|
|
|
|
|
The documentation found in this directory is hosted at: |
|
|
|
The documentation for Tendermint Core is hosted at: |
|
|
|
|
|
|
|
- https://tendermint.com/docs/ |
|
|
|
- https://tendermint.com/docs/ and |
|
|
|
- https://tendermint-staging.interblock.io/docs/ |
|
|
|
|
|
|
|
and built using [VuePress](https://vuepress.vuejs.org/) like below: |
|
|
|
built from the files in this (`/docs`) directory for |
|
|
|
[master](https://github.com/tendermint/tendermint/tree/master/docs) |
|
|
|
and [develop](https://github.com/tendermint/tendermint/tree/develop/docs), |
|
|
|
respectively. |
|
|
|
|
|
|
|
```bash |
|
|
|
npm install -g vuepress # global install vuepress tool, only once |
|
|
|
npm install |
|
|
|
## How It Works |
|
|
|
|
|
|
|
mkdir -p .vuepress && cp config.js .vuepress/ |
|
|
|
vuepress build |
|
|
|
``` |
|
|
|
There is a Jenkins job listening for changes in the `/docs` directory, on both |
|
|
|
the `master` and `develop` branches. Any updates to files in this directory |
|
|
|
on those branches will automatically trigger a website deployment. Under the hood, |
|
|
|
a private website repository has make targets consumed by a standard Jenkins task. |
|
|
|
|
|
|
|
Under the hood, Jenkins listens for changes (on develop or master) in ./docs then rebuilds |
|
|
|
either the staging or production site depending on which branch the changes were made. |
|
|
|
## README |
|
|
|
|
|
|
|
To update the Table of Contents (layout of the documentation sidebar), edit the |
|
|
|
`config.js` in this directory, while the `README.md` is the landing page for the |
|
|
|
website documentation. |
|
|
|
The [README.md](./README.md) is also the landing page for the documentation |
|
|
|
on the website. |
|
|
|
|
|
|
|
To view the latest documentation on the develop branch, see the staging site: |
|
|
|
## Config.js |
|
|
|
|
|
|
|
- https://tendermint-staging.interblock.io/docs/ |
|
|
|
The [config.js](./config.js) generates the sidebar and Table of Contents |
|
|
|
on the website docs. Note the use of relative links and the omission of |
|
|
|
file extensions. Additional features are available to improve the look |
|
|
|
of the sidebar. |
|
|
|
|
|
|
|
## Links |
|
|
|
|
|
|
|
**NOTE:** Strongly consider the existing links - both within this directory |
|
|
|
and to the website docs - when moving or deleting files. |
|
|
|
|
|
|
|
Relative links should be used nearly everywhere, having discovered and weighed the following: |
|
|
|
|
|
|
|
### Relative |
|
|
|
|
|
|
|
Where is the other file, relative to the current one? |
|
|
|
|
|
|
|
- works both on GitHub and for the VuePress build |
|
|
|
- confusing / annoying to have things like: `../../../../myfile.md` |
|
|
|
- requires more updates when files are re-shuffled |
|
|
|
|
|
|
|
### Absolute |
|
|
|
|
|
|
|
Where is the other file, given the root of the repo? |
|
|
|
|
|
|
|
- works on GitHub, doesn't work for the VuePress build |
|
|
|
- this is much nicer: `/docs/hereitis/myfile.md` |
|
|
|
- if you move that file around, the links inside it are preserved (but not to it, of course) |
|
|
|
|
|
|
|
### Full |
|
|
|
|
|
|
|
The full GitHub URL to a file or directory. Used occasionally when it makes sense |
|
|
|
to send users to the GitHub. |
|
|
|
|
|
|
|
## Building Locally |
|
|
|
|
|
|
|
and the documentation on master branch is found here: |
|
|
|
Not currently possible but coming soon! Doing so requires |
|
|
|
assets held in the (private) website repo, installing |
|
|
|
[VuePress](https://vuepress.vuejs.org/), and modifying the `config.js`. |
|
|
|
|
|
|
|
- https://tendermint.com/docs/ |
|
|
|
## Consistency |
|
|
|
|
|
|
|
Because the build processes are identical (as is the information contained herein), this file should be kept in sync as |
|
|
|
much as possible with its [counterpart in the Cosmos SDK repo](https://github.com/cosmos/cosmos-sdk/blob/develop/docs/DOCS_README.md). |