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.

96 lines
2.6 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)
  7. and [develop](https://github.com/tendermint/tendermint/tree/develop/docs),
  8. respectively.
  9. ## How It Works
  10. There is a Jenkins job listening for changes in the `/docs` directory, on both
  11. the `master` and `develop` branches. Any updates to files in this directory
  12. on those branches will automatically trigger a website deployment. Under the hood,
  13. a private website repository has make targets consumed by a standard Jenkins task.
  14. ## README
  15. The [README.md](./README.md) is also the landing page for the documentation
  16. on the website.
  17. ## Config.js
  18. The [config.js](./.vuepress/config.js) generates the sidebar and Table of Contents
  19. on the website docs. Note the use of relative links and the omission of
  20. file extensions. Additional features are available to improve the look
  21. of the sidebar.
  22. ## Links
  23. **NOTE:** Strongly consider the existing links - both within this directory
  24. and to the website docs - when moving or deleting files.
  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
  44. npm install -g vuepress
  45. ```
  46. then change the following line in the `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. ## Consistency
  63. Because the build processes are identical (as is the information contained herein), this file should be kept in sync as
  64. much as possible with its [counterpart in the Cosmos SDK repo](https://github.com/cosmos/cosmos-sdk/blob/develop/docs/DOCS_README.md).