金魚亭日常

読書,ガジェット,競技プログラミング

Jekyll 3.3 メモ

Windowsだと --watch が動かない

3.2.1 を使う

--watch arg is unsupported on Windows.                                                                        
If you are on Windows Bash, please see: https://github.com/Microsoft/BashOnWindows/issues/216                 

Autoregeration disabled on Windows · Issue #5462 · jekyll/jekyll · GitHub

Liqued の syntax warning が出る

Liquid Warning: Liquid syntax error (line 24): Expected id but found number in "hoge_hash in site.data.hoge.2016a" in hoge.html

_data/hoge 以下に 2016a2016b... とフォルダがあって,その下に 20160101.yaml みたいなファイルがいくつもあって,フォルダごとにループしたいときに,

{% for hoge_hash in site.data.hoge.2016a %}

...

{% endfor %}

って書いていたのを

{% for hoge_hash in site.data.hoge["2016a"] %}

...

{% endfor %}

に直す