0.0.1 • Published 8 years ago

gitbook-plugin-theme-ncbi v0.0.1

Weekly downloads
4
License
SEE LICENSE IN LI...
Repository
github
Last release
8 years ago

GitBook NCBI Theme

Pre-alpha state. Do not use!

Prerequisites and initial setup

For development (as opposed to authoring)

  • Node.js version ?FIXME? or later (testing with 6.9.1)
  • npm version ?FIXME? (testing with 3.10.9)
  • Add the directory "./node_modules/.bin" to your PATH.
  • A GitHub user account,
  • A GitBook user account that's integrated with GitHub:
    • If you are creating a new GitBook account, choose "login with your GitHub account" (or, just click here). GitHub will ask you to authorize the GitBook application -- please accept.
    • If you already have a GitBook account, and it isn't already integrated with GitHub, then please go to the GitHub Authorized applications page, and authorize GitBook.

Starting a new static site

Create a new GitHub repository, under your own account, to hold the static content. Enter a name and a description. Do NOT check "Initialize this repository with a README".

On the next screen, click "Import code", and enter "https://github.com/Klortho/ncbi-static-template.git". Then click "Begin import".

In case you're wondering why we don't recommend using GitHub's "fork" feature to start your new repo, there are many reasons. The main reason is that you can only have one fork of a given repo on GitHub, whereas you might need to manage several static sites.

Create a new GitBook, and wire it up to this GitHub repo.

  • From GitBook.com, click the "New" button
  • In the left-hand pane, scroll down until you find the "GitHub" option, and click that. Fill in the title and description. The title should exactly match the name of the repository
  • Click "Select a repository", and you should see a drop-down with a list of all of your GitHub repositories. If you don't, then you need to check your GitBook / GitHub integration.
  • Select the repository you just created, and click "Create book".

What that finishes, various resources become available on GitBook.com to help you manage and author your content, at these URLs:

You should also be able to view the published site, with NCBI styling:

Add collaborators:

  • From the GitBook settings page

Building locally

While you should be able to do most editing and administrative operations from the GitBook.com site, it can occasionally be useful to slip those surly bonds, and build your project locally.

To do so, clone your repo to your local machine, and install dependencies:

git clone git@github.com:{user}/{repo}.git
cd {repo}
npm install
gitbook install

To build your gitbook:

FIXME: not working at the moment.

gitbook build

If you have GitBook / GitHub integration set up correctly, then pushing to GitHub will cause GitBook to rebuild the site.