These instructions are intended for contributors. If you want to read the book, see: https://crigroup.gitbooks.io/osrobotics/content/ (live version), or http://www.osrobotics.org/osr/ (published version).
Installing GitBook is easy and straightforward. You just need:
- NodeJS (v4.0.0 and above is recommended)
You can install nodejs from the Ubuntu package repositories:
sudo apt-get install nodejsNow, let's create a symbolic link so that we can use the npm command:
sudo ln -s /usr/bin/nodejs /usr/bin/nodeCreate a directory for the packages:
mkdir -p ~/.npm_packagesIndicate to npm where to store the packages. In your ~/.npmrc file add:
prefix=~/.npm_packages
Ensure npm will find installed binaries and man pages. Add the following to
your ~/.bashrc file:
NPM_PACKAGES="~/.npm_packages"
PATH="$NPM_PACKAGES/bin:$PATH"
# Unset manpath so we can inherit from /etc/manpath via the `manpath` command
unset MANPATH # delete if you already modified MANPATH elsewhere in your config
export MANPATH="$NPM_PACKAGES/share/man:$(manpath)"Finally, source your ~/.bashrc file manually:
source ~/.bashrcSimply run the following command to install GitBook
sudo apt-get install npm
sudo npm install gitbook-cli -gmkdir -p ~/git; cd ~/git
git clone https://github.com/crigroup/osrobotics.gitcd ~/git/osrobotics
gitbook install
gitbook serve
If everything is right, the website will be served here: http://localhost:4000
rsync -r -a -v -e "ssh -p2222" --delete _book/ user@server:osrobotics/osr/