hexo-auto-category
hexo-auto-category copied to clipboard
文件夹更名后文章内容被清空
例如,当进行以下操作时,文件夹下所有的文章内容会被清空:
- _posts目录下存在一个文件夹,如:
test11
。文件夹下有文章test.md
- hexo三连:
hexo clean && hexo g && hexo s
。 - 此时更改文件夹的名字:
test 11 22
。热更新后,重命名后的文件夹下所有的文章内容均被清空。
日志:
INFO Generated: categories [[ 'test 11 22' ]] for post [test.md]
WARN Trying to "create" _posts/test 11 22/test.md, but the file already exists!
INFO No title found for post [source/_posts/test 11 22/test.md][ ]
INFO Generate link [0] for post [source/_posts/test 11 22/test.md][ ]
INFO Generated: categories [undefined] for post [source/_posts/test 11 22/test.md][ ]
INFO Generated: categories [[ 'test 11 22' ]] for post [test.md]
INFO No title found for post [source/_posts/test 11 22/test.md][ ]
INFO Generate link [0] for post [source/_posts/test 11 22/test.md][ ]
INFO Generated: categories [[ 'test 11 22' ]] for post [source/_posts/test 11 22/test.md][ ]
不知道是不是和文件名空格有关,尝试复现这个问题的时候只在某些情况下复现成功。最初发现这个 Bug 是 hexo s 执行后,我把名为 out of date
的文件夹,改为 OutOfDate
之后,OutOfDate
下的所有文章被清空。