安装Git并拉取分支,部署Jekyll
-
拉取代码
在项目页,找到原谅色按钮”clone or download”复制链接,通常为”https://github.com/用户名/项目名.git”。
调出命令行:
- windows为win键+R键,输入cmd
git clone https://github.com/Huxpro/huxpro.github.io.git
Jekyll
1
cd jekyll path
// 移动到你的jekyll项目下,也就是你从git里clone下来的项目
1
jekyll serve
// 启动服务,默认链接地址"http:localhost:4000"
期间遇到的一个问题:
1
2
3
4
5
$ jekyll serve
Configuration file: C:/www/wuxiumu.github.io/_config.yml
Deprecation: The 'gems' configuration option has been renamed to 'plugins'. Please update your config file accordingly.
Dependency Error: Yikes! It looks like you don't have jekyll-paginate 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-paginate' If you run into trouble, you can find helpful resources at https://jekyllrb.com/help/!
jekyll 3.8.5 | Error: jekyll-paginate
这个原因是因为没有jekyll-paginate,使用
1
gem install jekyll-paginate
安装一下就好了。
另外也有可能出现没有jekyll-gist错误,解决方法同上,这些错误取决模板所采用的一些服务。