Highlight in html issue with Jekyll/Liquid and pygments

佐手、 提交于 2020-01-24 19:41:10

问题


I'm using Jekyll with pygments and having an issue using {% highlight %} in .html posts. As you can see here, it is just printing out {% highlight %} yet on my homepage the syntax highlighting works See here: iwasasuperhero.

Here is the code for the index, and the code for the post: Here

I'm not really sure the issue or why it is working on the index but not the post page. Any ideas?


回答1:


It seems I have figured out my problem. I was using {{ page.content }} in my post.html instead of just {{ content }}.



来源:https://stackoverflow.com/questions/8863058/highlight-in-html-issue-with-jekyll-liquid-and-pygments

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!