How to Reference Twitter Bootstrap Documentation Locally, and Offline

I was doing research with the new ver­sion of Twit­ter Boot­strap, ver­sion 3 (RC). After cloning from the project’s repo:

https://github.com/twitter/bootstrap

I then checked out the release candidate’s branch “3.0.0-wip”:

git fetch origin
git checkout -b 3.0 origin/3.0.0-wip

The 3.0.0-wip branch direc­tory struc­ture is sim­i­lar to its mas­ter branch.

bootstrap-docs-01

Nav­i­gat­ing to the /docs direc­tory, you get these sta­tic, HTML-template files.

bootstrap-docs-02

With some research, it seems you’ll need to have Jekyll to serve these pages cor­rectly, locally. Pre­sum­ing you already have Ruby and Node.js (with npm) installed in your local devel­op­ment machine (e.g. laptop/desktop), let’s install Jekyll if you don’t already have it:

gem install jekyll

Then, we com­pile and build Boot­strap locally. Run this in your local repo direc­tory, e.g. ~/bootstrap:

make
bootstrap-docs-03

After that builds and com­pletes, let’s fire-up Jekyll to serve a local site con­sist­ing of Twit­ter Bootstrap’s doc­u­men­ta­tion. We type and run the following:

jekyll serve

This will use the _config.yml that’s included with the Boot­strap project’s repo, and serve a local site at:

http://getbootstrap.dev:9001

There you have it. Twit­ter Boot­strap Doc­u­men­ta­tion run­ning locally. Very handy if you are offline, or on the go.

bootstrap-docs-04

Leave a Comment

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>