问题一:产生404的原因便是因为缺少了index.html文件,解决方案如下: 在git bash中敲入 npm install hexo-generator-index --save 问题二:无法在本地搜索,解决方案如下: 在git bash中敲入 npm i hexo-generator-json-content@2.2.0 -S 问题三:如果提示错误:npm ERR! code EEXIST 尝试运行npm update -g npm然后再次运行npm i。 问题四: warning: LF will be replaced by CRLF in xxxx The file will have its original line endings in your working directory. 注:这是由于原因是路径中存在 / 的符号转义问题 如:创建文章时命名为中文,一般都出现这个小问题。 在命令行中输入: git config --global core.autocrlf false 然后重新生成文件部署就好了 问题五: hexo无法显示图片 在git bash中敲入 npm install hexo-asset-image --save 运行hexo n "xxxx"来生成md博文时,/source/_posts文件夹内除了xxxx.md文件还有一个同名的文件夹,把图片放入该文件夹。