jekyll语法荧光笔不起作用 [英] jekyll syntax highlighter not working
问题描述
我正在使用jekyll和Github Pages建立我的网站.然后,我按照 http://jekyllrb.com/docs/templates/#上的所有说明进行操作code-snippet-highlighting ,但是我的帖子中的语法荧光笔无法显示. 下面是代码:
I'm using jekyll and Github Pages to build my website. And I followed all the instructions on http://jekyllrb.com/docs/templates/#code-snippet-highlighting, however, the syntax highlighter within my post won't render. Below is the code:
{% highlight ruby %}
def print_hi(name)
puts "Hi, #{name}"
end
print_hi('Tom')
#=> prints 'Hi, Tom' to STDOUT.
{% endhighlight %}
我认为markdown文件也无法正确呈现.谁能告诉我我做错了什么?您可以在此处查看该帖子: https://amir0320.github.io/blog/welcome -to-jekyll/
And I think the markdown file doesn't render properly, either. Can anyone tell me where I did wrong? You can check the post here: https://amir0320.github.io/blog/welcome-to-jekyll/
推荐答案
之所以会发生这种情况,是因为您在Jekyll项目的css
文件夹中有一个名为main.css
的陈旧文件,该文件将替换Jekyll生成的文件.从SASS文件中获取.
This is happening because you are have a stale file called main.css
inside the css
folder of your Jekyll project, which is replacing the file generated by Jekyll from the SASS file.
即Jekyll构建css\main.scss
并创建文件_site\css\main.css
,但是随后它看到文件css\main.css
并将其复制到_site\css\main.css
,替换了通过SASS生成的初始文件.
i.e. Jekyll builds the css\main.scss
and creates a file _site\css\main.css
, but then it sees the file css\main.css
and copies it to _site\css\main.css
, replacing the initial file that was generated via SASS.
解决方案:删除此文件css\main.css
.
这篇关于jekyll语法荧光笔不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!