Umrabbit
文章7
标签8
分类3
Github-Hexo-Nexmoe个人博客搭建记录

Github-Hexo-Nexmoe个人博客搭建记录

使用的主题为:nexmoe

搭建指南:快速开始 | Hexo Theme Nexmoe

记得在根目录的配置文件_config.yml中将theme设置为nexmoe

一、安装hexo-cil

一开始装了hexo,后来强制装了hexo-cli

hexo与hexo-cil之间的关系:

参考文章:hexo和hexo-cli的关系? - SegmentFault 思否

二、配置

修改配置的时候,要在冒号后面加空格

参考文章:can not read a block mapping entry; a multiline key may not be an implicit key at line 4, column 1: - 黑质白章 - 博客园 (cnblogs.com)

三、hexo常用命令

命令 含义
hexo clean 用于清理缓存文件,即清除旧的内容,较为常用
hexo generate hexo g,用于生成静态文件
hexo server hexo s,可以在本地端口4000测试
hexo deploy -m “这里是注释” hexo d,将更新的内容推到git仓库中
hexo new xxx 在_post文件夹下新建xxx.md文件,推送时会自动提交

四、报错

报错①:

Plugin load failed: hexo-generator-json-content
Error: Cannot find module ‘D:\Blog\node_modules\hexo-generator-json-content\node_modules\hexo-util\lib\index’. Please verify that the package.json has a valid “main” entry

**解决方案:**去node_modules里删掉这个包,再hexo clean


报错②:

unable to access ‘https://github.com:Umrabbit/Umrabbit.github.io/’: URL using bad/illegal format or missing URL
FATAL Something’s wrong. Maybe you can find the solution here: https://hexo.io/docs/troubleshooting.html

使用hexo d指令,报连不上仓库的错

**解决方案:**根目录_config.yml文件里

deploy中仓库地址一定得是ssh,不能用http

同时可以配置一下自己的coding仓库:Hexo d -g踩坑指北 - 简书 (jianshu.com)


报错③:推送的时候报Spawn failed的错误

解决方案:Hexo部署出现错误err: Error: Spawn failed解决方式 - 简书 (jianshu.com)

本文作者:Umrabbit
本文链接:https://umrabbit.github.io/2022/11/18/HexoRecord/
版权声明:本文采用 CC BY-NC-SA 3.0 CN 协议进行许可
×