Jekyll-on-Github-Pages

link on JianShu

在github上使用github page:jekyll github pages 实际上,GitHub Pages are powered by Jekyll behind the scenes, so they’re a great way to host your Jekyll-powered website for free.

所有的相关文档可以在这里找到:Setting up a GitHub Pages site with Jekyll

新建站点之后,最新版本的jekyll 4.0.0似乎还没上到github上。Github page使用的官方依赖: https://pages.github.com/versions/看起来是3.8.5版本。

编辑Gemfile文件:

  • gem "github-pages", group: :jekyll_plugins 替换为 gem "github-pages", "~> 203", group: :jekyll_plugins
  • gem "jekyll", "~> 4.0.0" 替换为 gem "jekyll", "~> 3.8.5"版本。否则会提示 Could not find gem github-pages

然后重新执行:

# https://github.com/prose/starter/issues/44#issuecomment-562822698
bundle update jekyll
# followed by :
bundle install
# test site by launching it locally :
bundle exec jekyll serve

使用jekyll果然就比较简单了。

github page官方文档jekyll站点结构jekyll永久链接 jekyll permalinks

手动生成站点——

# jekyll --help
jekyll build
# 使用环境配置(不使用当前项目的配置)
bundle exec jekyll  build
 
comments powered by Disqus