Hexo报错YAMLException:incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line at line 1, column 46

Hexo生成时报错 ERROR Process failed: _posts/Hadoop20201203.md YAMLException: incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line at line 1, column 46: 寻找原因 有位博主说可能是因为冒号的原因,“yaml格式很严格,在:冒号之后要有空格”,我看了看我的文件,发现是正常的。 解决办法 忽然想到会不会是我其他地方也用了: ,冒号加空格,果然是这样,删掉空格就OK了,保证冒号加空格之前只能是健,后边是值。

2021-05-20 18:37:46 更新

error 'themes/next' does not have a commit checked out

hexo博客目录使用了git进行备份,但 在提交新的md文档时,提示 $ git commit -m "备份" . error: 'themes/next' does not have a commit checked out fatal: updating files failed 查询别的教程,提示说因为themes/next目录也是git仓库,删除其目录下的.git文件夹就行,但是我之前已经删除了,所以只能另辟蹊径,提交时指定文件。 git commit -m "备份" source/_posts/文档.md 或者指定目录 git commit -m "备份" source/* 即可成功,如果你接着提示 error: pathspec 'source/_posts/文档' did not match any file(s) known to git 看看你添加source/_posts/文档到暂存区了吗 使用git status 如果文件名是红色那就说明没有,先git add .填加到暂存区。

2021-05-20 18:37:46 更新