本地部署Bootstrap帮助文档

最近重温Bootstrap,想把它吃透!就从头开始学习,从github上下载源码,按照其中readme.md文件中的方法把源码中docs部署在本地。期间遇到了点问题,这里记录一下。

按照readme.md中的说法,他们使用的是jekyll这个东东来host的。为了使用这个玩意儿,本地要有ruby环境。关于这一点readme.md中说的很详细,并没有出现问题,原文如下:


1. If necessary, [install Jekyll](http://jekyllrb.com/docs/installation) and other Ruby dependencies with `bundle install`.
   **Note for Windows users:** Read [this unofficial guide](http://jekyll-windows.juthilo.com/) to get Jekyll up and running without problems.
2. From the root `/bootstrap` directory, run `bundle exec jekyll serve` in the command line.
4. Open `http://localhost:9001` in your browser



安装好jekyll后,按照上面的说法在bootstrap源码的根目录中执行bundle exec jekyll serve,系统报错说没有bundle这个命令,我没用过ruby,也不知道这个是啥。我试着这几jekyll serve,报出了如下的错误:


Dependency Error: Yikes! It looks like you don't have jekyll-sitemap or one of its dependencies installed. In order to use Jekyll as currently configured, you'll need to install this gem. The full error message from Ruby is: 'cannot load such file -- jekyll-sitemap' If you run into trouble, you can find helpful resources at http://jekyllrb.com/help/!


晕了,真心搞不懂了,我拿知道什么是jekyll-sitemap。我去jekyll官网上逛了一圈,上面有教怎么使用jekyll创建一个新的blog的,我试着做了:

jekyll new myblog

cd myblog

jekyll serve


成功了!我对比了myblog目录跟bootstrap目录,发现bootstrap根本与myblog目录结构不同,不过发现docs目录中的目录却跟myblog的目录结构相同。因此我就把命令行切换到bootstrap/docs下,再次执行jekyll serve。这次错误变了:


Configuration file: none
            Source: D:/windows/git/bootstrap/docs
       Destination: D:/windows/git/bootstrap/docs/_site
 Incremental build: disabled. Enable with --incremental
      Generating...
jekyll 3.1.6 | Error:  No such file or directory @ rb_sysopen - ./grunt/configBridge.json


找不到grunt/configBridge.json文件,我发现bootstrap根目录下有grunt,所以我把grunt拷贝到docs下。再次执行jekyll serve,这次成功了!!


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值