jekyll windows 折腾小记

ruby&jekyll:
https://jekyllrb.com/docs/windows/
https://davidburela.wordpress.com/2015/11/28/easily-install-jekyll-on-windows-with-3-command-prompt-entries-and-chocolatey/

  1. choco install ruby -y
  2. gem install jekyll

使用choco安装ruby和jekyll还算顺利。

然后新建项目文件夹

  1. jekyll new myblog
  2. cd myblog

然后看到了语法高亮插件, https://jekyllrb.com/docs/templates/#code-snippet-highlighting  果断选择支持语言多的,然后就 安装了python 安装P ygments (github并不支持 别折腾了 20160914更新)

(
安装 pygments.rb 还需要Ruby的DevKit 
choco install ruby2.devkit 失败了
但是文件已经下载下来了
按照 https://github.com/oneclick/rubyinstaller/wiki/Development-Kit的提示
C:\tools\DevKit2手工执行了 ruby dk.rb init,修改ruby安装路径,然后 r uby dk.rb install 才好
)

然后看到 https://jekyllrb.com/docs/quickstart/ 里面有bundle install命令,大概就是下载各种依赖包,包括主题之类的。
结果bundle install  遇到了openssl和gem镜像之间的问题 利用  https://gems.ruby-china.org/ 的http镜像解决问题

  1. bundle config mirror.https://rubygems.org https://gems.ruby-china.org

然后jekyll build、jekyll serve又遇到了主题空白问题 
https://github.com/jekyll/jekyll/issues/4677  https://github.com/jekyll/jekyll/issues/5192  
解决方案是copy C:\tools\ruby23\lib\ruby\gems\2.3.0\gems\minima-1.0.1\_layouts文件夹 到 当前项目路径内。


如果想要传到github pages 那么还需要按照 https://help.github.com/articles/using-jekyll-as-a-static-site-generator-with-github-pages/  的提示进行少许修改。

还有,这一切都是挂着s,开启了国外ip的代理,才顺利进行的。
欲哭无泪。
如果想要传到github pages 那么还需要按照 https://help.github.com/articles/using-jekyll-as-a-static-site-generator-with-github-pages/  的提示进行少许修改。

你可能感兴趣的:(jekyll windows 折腾小记)