发布于 

GitHub托管hexo博客

如何使用hexo + GitHub创建一个像本网站这样的博客?

一、搭建教程

Easy Hexo:https://easyhexo.com/

搭建教程来源于: https://www.itrhx.com/2018/08/15/A02-hexo-blog/

主题来源于: https://xaoxuu.com/wiki/material-x/

博客主题个性化:https://www.itrhx.com/2018/08/27/A04-Hexo-blog-topic-personalization/

免费图床:https://sm.ms/image/YQBe5n6FwJXziPM

域名购买:阿里云

添加百度统计:https://blog.csdn.net/m0_37808078/article/details/84992612

添加动态线条背景:http://www.pianshen.com/article/2952135188/

valine评论系统:https://valine.js.org/ https://inkss.cn/article/info/faca9026.html

备份Hexo博客环境文件:https://www.dazhuanlan.com/2019/11/20/5dd4a56f92fb4/

​ :https://www.itrhx.com/2019/09/29/A53-hexo-backup/

文章添加密码访问:https://www.jianshu.com/p/e4203ee066e5

hexo博客修改为https:https://wugenqiang.gitee.io/articles/hexo-do-https.html

hexo标题链接优化:https://github.com/cometlj/hexo-translate-title

网页底部添加备案号:https://www.makedreamsir.xyz

hexo同时托管到coding和GitHub:https://www.jianshu.com/p/25587e049d54

提交百度收录:https://www.jianshu.com/p/f8ec422ebd52

图片懒加载:https://blog.csdn.net/tingqinxiyin/article/details/93494680

七牛云免费图床:https://www.cnblogs.com/ssgeek/p/10854839.html

至此,一个托管在GitHub上的小站就已经做好了。

二、问题解决

  1. 在将博客迁回coding的时候总是404无法访问?

    问题在于绑定域名的时候绑定的是blublu.site,改为www.blublu.site就可以了。

  2. Hexo-Blog-Encrypt插件加密文章后本地预览正常,上线后输入密码无反应?

    原因是chrome禁用了http的资源引用,需要修改博客http链接为https链接。

  3. 主题更新方式?

    自行百度fork更新

  4. Hexo-Blog-Encrypt插件与图片懒加载插件存在冲突,解密之后无法加载图片。

    暂时没有解决方案

  5. typora配合picgo-core自动上传图片,遇到一些配置上的问题

    解决方案见 https://www.lzskyline.com/archives/87/

  6. 文章的md文件管理

    解决方案: https://blog.csdn.net/qq_21808961/article/details/83782253

  7. 引入阿里巴巴矢量图标库

    在主题文件夹中的/layout/layout.ejs文件中引入css文件地址:

    1
    <link rel='stylesheet' type='text/css' href='//at.alicdn.com/t/font_xxxxx.css'>

    然后在指定位置引入iconfont icon-shoucang即可