这种方法主要是用来在本地预览效果,这样不用每次写完博客或网页后必须上传到github上才能够看到效果。css
cd 解压目录 ruby dk.rb init ruby dk.rb install #官方源不可用 gem sources --add https://gems.ruby-china.org/ --remove https://rubygems.org/ gem install jekyll
gem sources --add https://gems.ruby-china.org/ --remove https://rubygems.org/
应为ssl没法经过的话,能够使用http协议。 3. 下载主题
4. 预览效果
jekyll --server --auto
http://localhost:4000 预览git
如下是本人安装过程当中遇到的问题:
Jekyll 3x版本使用主题时,在配置_config.yml时,github
markdown: redcarpet redcarpet: extensions: - hard_wrap - no_intra_emphasis - autolink - strikethrough - tables - lax_spacing - with_toc_data
改变为ruby
markdown: kramdown kramdown: input: GFM extensions: - autolink - footnotes - smart - hard_wrap - no_intra_emphasis - strikethrough - tables - lax_spacing - with_toc_data enable_coderay: true syntax_highlighter: rouge coderay: coderay_line_numbers: nil
参考连接bash