Gitbook information

To install gitbook cli

npm install -g gitbook-cli

To install gitbook runtime

gitbook install

npm run gitbook:install

To serve gitbook documentation

gitbook serve --port 8989

npm run gitbook:serve

Generate PDF

Prerequisites

  1. Install Calibre: https://calibre-ebook.com/download

  2. npm install svgexport -g"

  3. Pre-requisites for node-canvas: https://github.com/Automattic/node-canvas/wiki/_pages

  4. npm install canvas

  5. Run npm run gitbook:export:pdf

A file book.pdf will be generated in the root directory

Known Issues

  • npm install fails for the gitbook-pdf dependency. Here is a work-around: https://github.com/GitbookIO/gitbook-pdf/issues/23

  • removed "gitbook-pdf": "^0.0.2", as a dependency from package.json. Please manually install gitbook-pdf until the issue can be resolved

  • Export PDF does not contain a

Docker

Build

docker build --no-cache -t mojaloop/documentation .

Push

docker push mojaloop/documentation

Run

docker run --rm -it --name mojadoc -p 8989:8989 mojaloop/documentation

Last updated