更新Markdown引擎
12 Feb 2016
修改kramdown引擎
收到了GitHub Pages的邮件,大概是说,3月1号开始只支持kramdown引擎,代码高亮也要改成Rouge。参考链接:github-pages-now-faster-and-simpler-with-jekyll-3-0
只好再研究下——主要是改为kramdown后,代码高亮的问题。我可不想用the Liquid tag。(⊙o⊙)…
修改_config.yml:
highlighter: rouge
markdown: kramdown
kramdown:
input: GFM
貌似直接可用```包裹代码,呃,跟Markdown普通语法一致。剩下的就是去掉Pygments相关了。
function test() {
console.log("notice the blank line before this function?");
}
GitHub Pages now only supports Rouge, a pure-Ruby syntax highlighter, meaning you no longer need to install Python and Pygments to preview your site locally.
Rubyer的福音,可是我更熟悉Python啊(⊙o⊙)…
可是修改后查看localhost的是不行的。但是更新到pages上域名访问是可以的。
还有就是想引用Liquid tag,比如:
{% for post in paginator.posts %}
<a href="{{ post.url }}">{{ post.title }}</a>
{% endfor %}
就得使用{% raw %}标签。具体看看本页GitHub的源码吧。