jekyll遇到的一些问题

2019-06-27  本文已影响0人  叫我大欧就好

gem sources install失败

多运行几次就行了gem sources install

本地预览使用中文文件名

找到ruby安装路径
如:\Ruby22-x64\lib\ruby\2.2.0\webrick\httpservlet\filehandler.rb
找到下列两处,添加一句(+的一行为添加部分)
1、

path = req.path_info.dup.force_encoding(Encoding.find("filesystem"))
+ path.force_encoding("UTF-8") # 加入编码
if trailing_pathsep?(req.path_info)

2、

break if base == "/"
+ base.force_encoding("UTF-8") #加入編碼
break unless File.directory?(File.expand_path(res.filename + base))
上一篇 下一篇

猜你喜欢

热点阅读