1、选择主题html
选择你本身喜欢的主题git
参考:github
1.Hexo官网主题npm
2.知乎:有哪些好看的 Hexo 主题?json
2、配置主题hexo
1.我选择了hexo-theme-yilia这个主题,简洁大方,功能齐全;spa
这是他的地址:https://github.com/litten/hexo-theme-yiliacode
2.具体添加方法:server
安装 git clone https://github.com/litten/hexo-theme-yilia.git themes/yilia 配置 修改hexo根目录下的 _config.yml : theme: yilia
更新 cd themes/yilia git pull
3、可能会出现的问题htm
1.如图:
解决方法:如图所示,在git里执行命令 npm i hexo-generator-json-content --save
而且添加jsonContent这段配置信息;
2.执行命令 npm i hexo-generator-json-content --save 后,仍是上面的错误,或者如图这样子的
解决方案:
1.升级Node到6.X以及以上版本;
2.再执行一遍 npm i hexo-generator-json-content --save
就OK了。
3.若是有更多问题请参考 https://github.com/litten/hexo-theme-yilia/issues
4、换好主题后,建立新文章,进行预览
执行命令 hexo new "My New Post" ,关于更多建立,写做的命令信息,请阅读 https://hexo.io/zh-cn/docs/writing.html
执行命令 hexo server (或 hexo s)
再点击网址 http://0.0.0.0:4000
5、更新到GitHub上
执行三句命令
hexo clean
hexo generate
hexo deploy
而后刷新一下GitHub 博客项目页面,看是否更新好了,等更新好以后,再打开 https://arvin0.github.io/ 连接,就能够了,记得把用户名换成你的。