hexo搭建个人博客--记录

使用Hexo+Github一步步搭建属于自己的博客

https://www.cnblogs.com/fengxiongZz/p/7707219.html

安装node、git

node安装

https://www.runoob.com/nodejs/nodejs-install-setup.html

手把手教你从0开始搭建自己的个人博客

https://www.bilibili.com/video/av44544186

部署到码云【推荐】

https://caiyantao.gitee.io/2019/04/14/Hexo-%E4%B8%89/#more

然后进行命令三连杀

hexo clean&& hexo g && hexo d

hexo clean#清理各种缓存和旧文件

hexo g#生成静态文件

hexo s#开启服务器预览

 其他命令

hexo new "postName" #新建文章

hexo new page "pageName" #新建页面

hexo generate #生成静态页面至public目录

hexo server #开启预览访问端口(默认端口4000,'ctrl + c'关闭server)

hexo deploy #将.deploy目录部署到GitHub

hexo help  # 查看帮助

hexo version  #查看Hexo的版本

hexo deploy -g  #生成加部署

hexo server -g  #生成加预览

命令的简写

hexo n == hexo new 

hexo g == hexo generate  #生成文件

hexo s == hexo server #运行本地服务器

hexo d == hexo deploy #上传到服务器

hexo踩坑之github没有样式

 我自己的问题是忘了给配置文件加上自己的github链接


 

hexo博客常用插件及教程

https://blog.csdn.net/q2158798/article/details/82354154

hexo替换图标

https://fontawesome.com/icons?d=gallery&s=brands


hexo中cactus图标替换

hexo中cactus主题链接

https://github.com/probberechts/hexo-theme-cactus

hexo添加评论(gitalk)

Hexo 的 cactus 主题集成 Gitalk 评论

https://www.jianshu.com/p/a7d852bd1fc7

设置三个就ok了

①在 themes/cactus/_config.yml 配置文件中,配置 Gitalk

②在 themes/cactus/layout/_partial/comments.ejs 中

③在 themes/cactus/layout/post.ejs 中查看最后一行是不是 <%- partial('_partial/comments') %> 确认将 comments.ejs 引入进来。

hexo添加访问量统计

把两行代码粘到footer.ejs

http://busuanzi.ibruce.info/

博客链接https://cookieabc.github.io/

注:感觉部署在github上太慢了,就关闭了,

 

原文地址:https://www.cnblogs.com/rab3it/p/11366775.html