21

I'm trying to compile bootstrap 3. I have the repo cloned on my local. I run make in the bootstrap directory.

aaas-imac:bootstrap aaa$ make



Building Bootstrap...
--------------------------------------------------
Running JSHint on JavaScript...             ✔ Done
Compiling LESS with Recess...               ✔ Done
Prepping documentation assets...            ✔ Done
Compiling and minifying JavaScript...       ✔ Done
--------------------------------------------------
Success!

Thanks for using Bootstrap,
<3 @mdo and @fat

aaas-imac:bootstrap aaa$ 

I don't see the compiled docs anywhere?

Bass Jobsen
  • 48,736
  • 16
  • 143
  • 224
Harry
  • 52,711
  • 71
  • 177
  • 261

7 Answers7

14

To install Jekyll and build: (Note for windows see: https://stackoverflow.com/a/16853614/1596547)

  1. install rubygems (sudo apt-get install rubygems)
  2. (sudo) gem install jekyll
  3. go to the ./docs dir of your bootstrap install (see also: Explore and install Twitter Bootstrap 3)
  4. run jekyll --server from your bootstrap dir
  5. visit http://localhost:9001/ http://localhost:9001/docs.html in your browser

NB the default port for WEBrick will be 9001. If this port is not avaible an other port will be used: WARN TCPServer Error: Address already in use - bind(2) INFO WEBrick::HTTPServer#start: pid=30728 port=4000

When you visit http://localhost:9001/ you will find a home screen. The "View docs" button links to /docs/ while the docs are on docs.html See below:

Twitter's Bootstrap 3.0.0 Docs

Now (jul 10 2013) the navbar links seems broken (missing .html) so use http://localhost:9001/javascript.html in stead of http://localhost:9001/javascript. See also: https://github.com/twitter/bootstrap/pull/8443

Using git (jekyll already installed):

git clone --branch 3.0.0-wip git://github.com/twitter/bootstrap.git
cd bootstrap
jekyll --server

visit http://localhost:9001/ or http://localhost:4000/

UPDATE @lee-whitney suggests to use jekyll serve instead of jekyll --server. The jekyll serve command creates a directory with the html files of the docs. You could serve this files on a (local) webserver. jekyll serve don't start a (jekyll) server. I test this commands on linux (Ubuntu 12.04LTS) with Jekyll 0.12.1

Community
  • 1
  • 1
Bass Jobsen
  • 48,736
  • 16
  • 143
  • 224
11

Bootstrap 3.0's docs are built using Jekyll. To view the docs locally, you'll need to install Jekyll to run a local server.

jpgeek
  • 4,991
  • 2
  • 28
  • 26
Kisuka
  • 1,832
  • 1
  • 15
  • 10
  • 1
    The link doesn't point to the docs. On the page is only a link to the github issue of Bootstrap 3 – Willem de Wit Apr 03 '13 at 12:38
  • 1
    At the time when my answer was posted it did point to a hosted copy of the Bootstrap 3 docs. They've since removed it. You'll have to start up a local Jekyll server to few the documentation now. – Kisuka Apr 06 '13 at 07:02
  • 2
    @ZainShaikh I wrote a post about it: http://blog.greenmice.info/2013/04/twitter-bootstap-3-building-reading-docs.html tl;dr; jekyll . /tmp/bootstrap3-docs/ ; cd /tmp/bootstrap3-docs ; python -m SimpleHTTPServer 8000 – rvs Apr 21 '13 at 11:55
  • 18
    For those interested. I compiled the docs and put it up at http://bootstrap.harp.io. I'll try to keep them up until the bootstrap team get them online. – sintaxi May 03 '13 at 22:19
  • @sintaxi the docs seems to be not up to date. It's possible to share how did you build it or update to the latest version? Thanks – Diego Vieira Oct 31 '13 at 20:36
5

In Windows ( perfectly tested by me not sure of linux ) :

Step1 : Download Bootstrap3 : github.com/twitter/bootstrap/archive/3.0.0-wip.zip
Step2 : Download Ruby : Click Here
Step3 : Download Devkit : Click Here and extract it to some directory.
Step4 : Go to devkit direcory via ruby terminal and execute following commands

ruby dk.rb init
ruby dk.rb install
gem install jekyll --version '= 0.11.0'

Version step is very crucial as I was not able to compile the docs in latest version of jekyll so I switched to older version.

Step5 : go to the root dir of your bootstrap directory
Step6 : run jekyll --server
Step7 : visit localhost:9001/ or localhost:4000/ in your browser ( one of them will surely work )

Diego Vieira
  • 1,150
  • 2
  • 13
  • 31
Abhishek Goel
  • 18,785
  • 11
  • 87
  • 65
3

I tried Abhishek's method and it did work. But not completely. I still got some Fluid errors.

So I did a lot of digging around and found a solution. Compiling Bootstrap 3 is bit more annoying than 2.3.2

Do the following to compile and get it running.

  1. Get Bootstrap 3 master zip

  2. Get Ruby 1.9.3

  3. Get DevKit

  4. Install Python 2.7 and update the PATH Environment Variable with the python directory

  5. Get Jekyll 1.x as mentioned on the GitHUb page of Bootstrap.

    Go to devkit directory via ruby terminal and execute following commands

    ruby dk.rb init
    ruby dk.rb install
    gem install jekyll

  6. Uninstall pygments 0.5.2 and install pygments 0.5.0

    gem uninstall pygments.rb --version "=0.5.2"
    gem install pygments.rb --version "=0.5.0"

  7. Go to the root directory of the extracted bootstrap source in your terminal and run the following

    chcp 65001
    jekyll serve

Now browse to localhost:9001 and there, you should see the docs hosted locally.

NOTE: Once compiled, you can access those pages without having to run the jekyll serve command every time. Just open the html pages as you would do with any locally saved web page.

Also, feel free to delete the extracted DevKit files as you won't be using them again for viewing the docs.

  • You sir, are fantastic. I was wracking my brain over this for a while. +1 – robabby Oct 09 '13 at 02:28
  • This got me a long way, but the final step to compile the doc files permanently didn't work for me. I find that I have to go to the bootstrap directory and run jekyll --server every time to view the docs correctly. – DavidHyogo Apr 19 '14 at 04:44
1

Here are the compressed docs, no need to do anything but read. Full downloadable Bootstrap 3 docs.

http://web3canvas.com/item/bootstrap-3-docs/

Enjoy!

Alejandro Casanova
  • 3,633
  • 4
  • 31
  • 46
1

Here is the complete solution

To install Jekyll, Rouge and build:

if you dont have ruby installed - http://jekyll-windows.juthilo.com/2-jekyll-gem/

  1. from comand promt, cd into your bootstrap folder
  2. run npm install - if you run into problems, do a npm update
  3. if jekyll was not install, run gem install jekyll
  4. then run gem install rouge
  5. run jekyll server from your bootstrap folder
  6. visit http://localhost:9001/
Charl Kruger
  • 150
  • 1
  • 6
0

Update: For Bootstrap version 3.3.4

To run the Twitter Bootstrap(v3.3.4) docs locally, I performed following steps and hope it might help others.

Steps:

  • gem install jekyll (need to have Ruby, Rubygems installed)
  • git clone --branch gh-pages git://github.com/twitter/bootstrap.git

    (now gh-pages branch holds all docs stuff)

  • cd bootstrap
  • jekyll serve
  • Visit http://127.0.0.1:4000/ default server url
Dhanu Gurung
  • 8,480
  • 10
  • 47
  • 60