Windows下使用Hexo的一个坑
楔子
Hexo很好很强大 我很喜欢 但用的时候也遇到一些问题 今天这个是我觉得比较恶心的
背景
我一直在Windows下用Emacs写Hexo 上传到运行Debian的服务器(VPS)上
而Windows嘛 一个特性是文件系统大小写不敏感 *nix系列的系统大小写是分的很清楚的
坑
我在新建(hexo new
)的时候输入的标题是Different Coding for Chinese
这样新建出来的文件名是Different-Coding-for-Chinese.md
generate deploy 都没问题 但我偶然发现这和其他的命名规则不一样 于是 我直接把文件名改成了只有首字母大写的形式 麻烦来了 本地测试的时候一点问题都没有 但跑到服务器上就无法正常打开 我怀有是Nginx的配置文件有问题 因为昨晚为了这个东东折腾了半个晚上 于是又尝试在配置文件上找毛病 可找来找去 就这几行 能有啥毛病
不知道是脑子想什么了 我突然想到 会不会是大小写的问题呢 于是 我hexo clean
后又生成 上传 毛病就没有了 因为这时候删除重新生成纠正了目录大小写不一致的问题