Skip to content
This repository has been archived by the owner on Jan 6, 2020. It is now read-only.
Viv-Rajkumar edited this page Aug 21, 2014 · 2 revisions

GitBook Update Instructions

Requirements

Node Package Manager (Download Link) is required for GitBook. npm comes bundled with the package.

Once installed, navigate to the "gitbook_src" folder in command prompt / terminal and run the following commands to install the required node modules.

grunt-cli: (This will put the grunt command in your system path, allowing it to be run from any directory. You may need to use sudo/admin command prompt for this to work)

git clone git@github.com:maidsafe/maidsafe-examples.git
cd maidsafe-examples/gitbook_src
npm install -g grunt-cli
npm install

That's it.

Build

Use GitBook editor to make updates in the master branch (GitBook editor tool currently does not seem to support multi language setups. So navigate into the "en" folder as the book root directory and it should work fine)

  • You can preview the book locally via the GitBook editor UI tool.
  • You can also run grunt from terminal when in the "gitbook_src" folder. This will create a new folder "_book" with the book output.

Publish:

Note: If you're creating a fork to submit a pull request for content updates, you would not have to do the following. Just submit a pull request from your forked project's master branch to master branch on the source repo.

To publish the book and update the live book, from the "gitbook_src" folder, run:

grunt publish

Above command will build and publish the built book by pushing the output from "_book" folder to the gh-pages branch.

Clone this wiki locally