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.

102 lines
3.0 KiB

  1. # Docs Build Workflow
  2. The documentation for Tendermint Core is hosted at:
  3. - https://tendermint.com/docs/ 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. To build and serve the documentation locally, run:
  41. ```
  42. # from this directory
  43. npm install -g vuepress
  44. ```
  45. NOTE: the command may require `sudo`.
  46. then change the following line in the `.vuepress/config.js`:
  47. ```
  48. base: "/docs/",
  49. ```
  50. to:
  51. ```
  52. base: "/",
  53. ```
  54. Finally, go up one directory to the root of the repo and run:
  55. ```
  56. # from root of repo
  57. vuepress build docs
  58. cd dist/docs
  59. python -m SimpleHTTPServer 8080
  60. ```
  61. then navigate to localhost:8080 in your browser.
  62. ## Search
  63. 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.
  64. ## Consistency
  65. Because the build processes are identical (as is the information contained herein), this file should be kept in sync as
  66. much as possible with its [counterpart in the Cosmos SDK repo](https://github.com/cosmos/cosmos-sdk/blob/master/docs/DOCS_README.md).