You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

92 lines
3.1 KiB

  1. # Docs Build Workflow
  2. The documentation for Tendermint Core is hosted at:
  3. - https://docs.tendermint.com/master/ and
  4. - https://tendermint-staging.interblock.io/docs/
  5. built from the files in this (`/docs`) directory for
  6. [master](https://github.com/tendermint/tendermint/tree/master/docs) respectively.
  7. ## How It Works
  8. There is a CircleCI job listening for changes in the `/docs` directory, on both
  9. the `master` branch. Any updates to files in this directory
  10. on those branches will automatically trigger a website deployment. Under the hood,
  11. the private website repository has a `make build-docs` target consumed by a CircleCI job in that repo.
  12. ## README
  13. The [README.md](./README.md) is also the landing page for the documentation
  14. on the website. During the Jenkins build, the current commit is added to the bottom
  15. of the README.
  16. ## Config.js
  17. The [config.js](./.vuepress/config.js) generates the sidebar and Table of Contents
  18. on the website docs. Note the use of relative links and the omission of
  19. file extensions. Additional features are available to improve the look
  20. of the sidebar.
  21. ## Links
  22. **NOTE:** Strongly consider the existing links - both within this directory
  23. and to the website docs - when moving or deleting files.
  24. Links to directories _MUST_ end in a `/`.
  25. Relative links should be used nearly everywhere, having discovered and weighed the following:
  26. ### Relative
  27. Where is the other file, relative to the current one?
  28. - works both on GitHub and for the VuePress build
  29. - confusing / annoying to have things like: `../../../../myfile.md`
  30. - requires more updates when files are re-shuffled
  31. ### Absolute
  32. Where is the other file, given the root of the repo?
  33. - works on GitHub, doesn't work for the VuePress build
  34. - this is much nicer: `/docs/hereitis/myfile.md`
  35. - if you move that file around, the links inside it are preserved (but not to it, of course)
  36. ### Full
  37. The full GitHub URL to a file or directory. Used occasionally when it makes sense
  38. to send users to the GitHub.
  39. ## Building Locally
  40. Make sure you are in the `docs` directory and run the following commands:
  41. ```sh
  42. rm -rf node_modules
  43. ```
  44. This command will remove old version of the visual theme and required packages. This step is optional.
  45. ```sh
  46. npm install
  47. ```
  48. Install the theme and all dependencies.
  49. ```sh
  50. npm run serve
  51. ```
  52. Run `pre` and `post` hooks and start a hot-reloading web-server. See output of this command for the URL (it is often https://localhost:8080).
  53. To build documentation as a static website run `npm run build`. You will find the website in `.vuepress/dist` directory.
  54. ## Search
  55. We are using [Algolia](https://www.algolia.com) to power full-text search. This uses a public API search-only key in the `config.js` as well as a [tendermint.json](https://github.com/algolia/docsearch-configs/blob/master/configs/tendermint.json) configuration file that we can update with PRs.
  56. ## Consistency
  57. Because the build processes are identical (as is the information contained herein), this file should be kept in sync as
  58. much as possible with its [counterpart in the Cosmos SDK repo](https://github.com/cosmos/cosmos-sdk/blob/master/docs/DOCS_README.md).