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.

95 lines
3.1 KiB

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