谢谢!我在windows9上安装了jekyll,但当我在中文博客上提供jekyll时,它显示了utf8错误,但当我在纯英文博客上提供jekyll时,它工作了!这是我的截图
Zepu@ZEPUXI /E/Github/utf8 (master)
$ 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
我该怎么解决这个问题呢?谢谢!
发布于 2015-04-30 21:45:47
您能检查一下您的文件e:/Github/utf8/_posts/2015-04-11-jekyll_on_windows.md
没有BOM
吗
utf-8
和no BOM
(记事本++在这方面做得很好)。https://stackoverflow.com/questions/29962610
复制相似问题