前置信息

[wordpress建站](WordPress为什么免费?搭建WordPress网站要花多少钱? - 窝小力的文章 - 知乎 https://zhuanlan.zhihu.com/p/91557826)

阿里云学生机:link1link2link3

优秀博客订阅

张鑫旭博客

廖雪峰博客

网站集合

运维、linux

重要代码

hexo clean #清除缓存文件db.json和已生成的静态文件public
hexo g #生成网站静态文件到默认设置的 public 文件夹(hexo generate 的缩写)
hexo d #自动生成网站静态文件,并部署到设定的仓库(hexo deploy 的缩写)
hexo s # 启动服务预览,hexo server

hexo n "article title" #新建一篇文章,hexo new post

hexo server #Hexo会监视文件变动并自动更新,无须重启服务器
hexo server -s #静态模式
hexo server -p 5000 #更改端口
hexo server -i 192.168.1.1 #自定义 IP

博客构建

hexo+butterfly,搭建博客:作者个人博客推荐、nodejs、Github、个人域名、Butterfly主题
hexo+Github搭建博客:内容和上一篇类似,但更详细了些,对应的是matery主题
GitHub+hexo:里面有一些基本命令,对应的是Next主题,也介绍了图床、markdown语法

自动备份Hexo中的博客源文件手动备份链接(针对上面链接中的备份博客源文件进行了细化),此外,介绍了自动备份的方案

GitHub+PicGo构建图床

对于butterfly相关的配置也是相关设置

图标

valine评论系统设置

自定义侧边栏

Hexo 插入 Bilibili 视频自适应 | Tamsiree

在butterfly主题中添加rss订阅 | 老猫的博客 (dclef.icu)

手动更新:

git add .
git commit -m "updateinf"
# git pull --rebase origin master
git push -u origin master

Page Front-matter

MARKDOWN---
title:
date:
type: (tags,link,categories这三个页面需要配置)
comments: (是否需要显示评论,默认true)
description:
top_img: (设置顶部图)
mathjax:
katex:
---

Post Front-matter

---
title:
date:
tags:
categories:
keywords:
description:
top_img: (除非特定需要,可以不写)
comments 是否显示评论(除非设置false,可以不写)
cover: 缩略图
toc: 是否显示toc (除非特定文章设置,可以不写)
toc_number: 是否显示toc数字 (除非特定文章设置,可以不写)
copyright: 是否显示版权 (除非特定文章设置,可以不写)
mathjax:
katex:
hide:
---

添加自定义html: Hexo博客技巧:添加自定义html页面_hexo里html-CSDN博客

插入视频:hexo文章插入音乐和视频_hexo插入视频-CSDN博客

(设置宽高,设置不自动播放,url最后面加上 &autoplay=0)

目录结构

参考:hexo博客迁移到另一台电脑_littlehaes的博客-CSDN博客

错误处理

YAMLException: can not read a block mapping entry; a multiline key may not be an implicit key:md文档中的头部信息里,键值对之间需要有空格

unexpected token问题

Hexo部署错误:err: Error: Spawn failed_error: spawn failed at childprocess.<anonymous> (/_cuntou0906的博客-CSDN博客

【Hexo】Hexo-butterfly全局字体的修改 | sheerkvc

未整理

GitHub Pages如何部署Vite项目 - 掘金 (juejin.cn)

https://www.antmoe.com/posts/75a6347a/

看到了评论的设置这一块

短短1天我学会了如何修改Butterfly的配置文件 - XJHui - 博客园 (cnblogs.com)

这个也是评论设置这一块

butterfly文章页美化教程-腾讯云开发者社区-腾讯云 (tencent.com)

hexo(butterfly)添加说说页面(Artitalk可在线发布)_cungudafa的博客-CSDN博客

https://blog.51cto.com/u_15127636/3257851
https://butterfly.js.org/
https://winney07.github.io/2018/08/02/%E5%9C%A8Hexo%E5%8D%9A%E5%AE%A2%E4%B8%AD%E5%8F%91%E5%B8%83%E6%96%87%E7%AB%A0/
https://winney07.github.io/2018/08/02/%E5%9C%A8Hexo%E5%8D%9A%E5%AE%A2%E4%B8%AD%E5%8F%91%E5%B8%83%E6%96%87%E7%AB%A0/
https://bore.vip/archives/5b629e16/
https://butterfly.js.org/posts/4aa8abbe/#%E6%96%87%E7%AB%A0%E5%B0%81%E9%9D%A2