Compile Twitter bootstrap 3 docs (How to)?

2019-01-17 07:00发布

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?

7条回答
兄弟一词,经得起流年.
2楼-- · 2019-01-17 07:50

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.

查看更多
登录 后发表回答