Skip to content

warmhug/warmhug.github.com

Repository files navigation

tips

  • 文件名不要以下划线开始,不然访问不到
  • 文件名不要包含单双引号,空格
  • 文件内容,不能包含下划线

jekyll用了 liquid 作为模板,{{、}} {%、%} 等会被解析掉。若要显示这些,用

{% raw %}
...lots of liquid code goes here and it doesn't get interpreted...
{% endraw %}

serve

# 安装 https://jekyllrb.com/docs/
jekyll serve     # http://localhost:4000/index.html
jekyll serve --host 0.0.0.0    # http://ip:4000/index.html

troubleshooting

https://jekyllrb.com/docs/troubleshooting/

mac 自带的 ruby 在运行 jekyll 时有问题,brew 安装 ruby@3 在 .zshrc 里加入 ruby@3 的 bin 路径。 过程中有些依赖出错、就相应单独安装,比如 brew install libyaml / readline / ...

# 先关闭sip (System Integrity Protection in macOS v10.11)
gem install -n /usr/local/bin jekyll
# 安装 jekyll plugins
gem install jekyll-feed jekyll-paginate jekyll-redirect-from jekyll-seo-tag

Releases

No releases published

Packages

No packages published