Skip to content

Latest commit

 

History

History
101 lines (65 loc) · 2.64 KB

README.md

File metadata and controls

101 lines (65 loc) · 2.64 KB

Gitbook Template

A Gitbook seed project

What is this ?

This is a template project for creating books using Gitbook. The actual gitbook is BIOPset Documentation.

What is the software required to install it ?

You must have installed node.js, Git and the Gitbook Command Line tools

  • For node.js

    • To check if the node.js is installed, you may execute:

      $ npm -v
      
    • if it is not installed, you must download and install the software from the official node.js website

  • For Git

    • To check if Git is installed, you may execute:

      $ git --version
      
    • if it is not installed, you must download and install the software from the official Git website

  • For Gitbook Cli (command line tools)

    • To check if Gitbook-Cli is installed, you may execute:

      $ gitbook -V
      
    • If it is not installed, you must install the package using npm as an administrator

      $ npm install -g gitbook-cli
      
    • In linux or mac, you may use sudoto set the user and the path for the .npm folder and install the package

      $ export PATH=$PATH:$HOME/.npm-packages/bin
      $ sudo chown -R $USER:$GROUP ~/.npm
      $ sudo npm install -g gitbook-cli
      

How to install it ?

If you want to edit the book using the Gitbook Editor, you only need to clone the repository. You may create a new book in the editor using the resulting Git repository.

To deploy the book in a Github-Pages website, you must change the URL for the repository in the package.json file.

  • Check the URL of the repository in the Github.
  • Replace the URL of the repository. By default, it is "noname/noname.git"

How to run it ?

The project includes a set of commands that can be used to automate part of the process.

  • To install or update the Gitbook plugins

    $ npm run book:prepare
    
  • To preview the book. It runs a webserver where you can review the book while you are writing. Any change in the book is displayed immediately.

    $ npm run book:watch
    
  • To create the book (in Windows)

    $ npm run book:build
    
  • To publish the book in a Github-Pages website (in Windows)

    $ npm run book:publish
    
  • To create the book (in Linux)

    $ npm run book:build-linux
    
  • To publish the book in a Github-Pages website (in Linux)

    $ npm run book:publish-linux