Update documentation
The follow operations should be performed in master branch unless otherwise specified
Setup docs compiling environment
-
Make sure the following dependencies are installed:
- Node: LTS version v12.16.3+
- Rust: v1.46.0+
-
Install
mdBookcargo install mdbook -
Initialize docs compiling environment
make doc-initYou can use
make doc-cleanto cleanup files generated in this step. If you want to redo the initialization, please do a cleanup first
Update docs
-
Run docs dev server:
make doc-devand a open browser tab at
http://localhost:3000 -
Make changes to Markdown files in
docsdirectory, which will trigger the dev server to hot-reload the docs in the browser. This is a good way for to preview the changes. Please note that anything other than a symbolic link or a Markdown file indocswill be copied todocs_output/book/htmlbymake doc-devormmake doc-buildthen be synced todocs_output/gh-pagesbymake doc-deploywith extraneous files removed. So if you want to add a file togh-pages, add todocsfirst, otherwise that file will be deleted during the syncing
Notes:
-
If you have changed the anchor types in protos or their configuration in
tools/anchor-types-updater/manifests(previously inprovendb-releasesbefore moving to the new cluster), you need to regenerate the Anchor Types page atdocs/concepts/anchor_types.mdmake doc-anchortypes -
If you have changed the Node SDK code, you need to regenerate the Node SDK reference at
docs_output/gh-pages/node_sdk/referencemake doc-node -
If you want to temporarily ignore a link when building the docs, you can add it to
output.linkcheck.excludeinbook.toml. Please remember to remove it after you have fixed your problem
Deploy updated docs
-
Make a production build of the docs:
make doc-buildthis will generate the htmls in
docs_output/book -
Sync changes to the directory
docs_output/gh-pages(the checkout ofgh-pagesbranch) fromdocs_output/book/html:make doc-deploy -
Go to the
docs_output/gh-pagesdirectory, review changes and perform a git commit ongh-pagesbranch:cd docs_output/gh-pages # review changes git status # commit git add . git commit -am "Some meaningful commit message"