谢谢!我在windows9上安装了jekyll,但是当我在中文博客上提供jekyll时,它显示utf8错误,但是当我在仅限英文的博客上提供jekyll时,它可以工作! 这是我的截图
Zepu @ ZEPUXI / E / Github / utf8(主)
$ jekyll serve
Configuration file: e:/Github/utf8/_config.yml
Source: e:/Github/utf8
Destination: e:/Github/utf8/_site
Generating...
Error reading file e:/Github/utf8/_posts/2015-04-11-jekyll_on_windows.md: invalid
byte sequence in UTF-8
jekyll 2.4.0 | Error: invalid byte sequence in UTF-8
这是一个英文博客截图
$ jekyll serve
Configuration file: e:/Github/rifyll-master/rifyll-master/_config.yml
Source: e:/Github/rifyll-master/rifyll-master
Destination: e:/Github/rifyll-master/rifyll-master/_site
Generating...
done.
Please add the following to your Gemfile to avoid polling for changes:
gem 'wdm', '>= 0.1.0' if Gem.win_platform?
Auto-regeneration: enabled for 'e:/Github/rifyll-master/rifyll-master'
Configuration file: e:/Github/rifyll-master/rifyll-master/_config.yml
Server address: http://0.0.0.0:4000/
Server running... press ctrl-c to stop.
所以我的中文博客_config.yml就在这里:
encoding: UTF-8
# Dependencies
markdown: rdiscount
highlighter: pygments
# Permalinks
#
# Use of `relative_permalinks` ensures post links from the index work
permalink: pretty
relative_permalinks: true
我如何解决这个问题?谢谢!!!
答案 0 :(得分:0)
您能否检查一下您的文件e:/Github/utf8/_posts/2015-04-11-jekyll_on_windows.md
是否有BOM
utf-8
和no BOM
(记事本++做得很好)。Jekyll serve --trace