1
0
mirror of https://github.com/taigrr/nats.docs synced 2025-01-18 04:03:23 -08:00
nats.docs/building_the_book.md
Stephen Asbury cc850776b8 Cleaned up developer doc
Proof'd everything and improved flow
Renamed advanced to events
Reordered sending/receiving
Added text type to languages for prism plugin
2019-05-16 13:06:37 -07:00

1.3 KiB

Building the Book

Before doing anything else, install the legacy command line for gitbook:

npm install -g gitbook-cli

Docs are available as separate items in 6efbb70c32/docs. All of the links go to the new site so you have to poke around manually.

The build uses https://github.com/Bandwidth/gitbook-plugin-include-html to include html directly for code examples as well as the prism plugin, https://github.com/gaearon/gitbook-plugin-prism, to handle code highlighting. CSS for code highlighting seems to get mucked up sometimes if you don't use the default them, this is something to work on in the future. We are also using https://github.com/poojan/gitbook-plugin-toggle-chapters, tried https://github.com/rtCamp/gitbook-plugin-collapsible-menu but it messed up the HTML.

Icons for dev examples are from https://cdn.materialdesignicons.com/3.6.95/.

To build the examples

% go run tools/examplecompiler/main.go -o developer/examples -r tools/examplecompiler/example_repos.json -t tools/examplecompiler/example_template.tmp

or just use the make file make will download the gitbook plugins, build the example html and build the book.

make serve will just serve the files without all the other prep work.