Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.

Quick Start

Create a new post

1
$ hexo new "My New Post"

More info: Writing

Run server

1
$ hexo server

More info: Server

Generate static files

1
$ hexo generate

More info: Generating

Deploy to remote sites

1
$ hexo deploy

More info: Deployment

排障

1
2
3
INFO  Deleted database.
FATAL Something's wrong. Maybe you can find the solution here: https://hexo.io/docs/troubleshooting.html
Error: EBUSY: resource busy or locked, rmdir 'D:\blog\public'

说来可笑,重启解决

图片挂载

1
npm install https://github.com/7ym0n/hexo-asset-image --save 

切换action部署

https://blog.csdn.net/lovedingd/article/details/119041379
如果出现hexo g 生成的文件为空的情况,考虑hexo根目录_config.yml中的主题是否存在且正确。如果不存在就在workflow配置中安装部署
可以参考

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
- name: install hexo theme
run: |
# 1. 创建文件夹
echo "pwd: "
pwd
mkdir -p themes/
cd themes/
git clone -b master https://github.com/jerryc127/hexo-theme-butterfly.git
ls -al
# 替换文件
cp /home/runner/work/blog/blog/tmp_config.yml /home/runner/work/blog/blog/themes/hexo-theme-butterfly
ls -al
echo "pwd:"
pwd
mv /home/runner/work/blog/blog/themes/hexo-theme-butterfly/_config.yml /home/runner/work/blog/blog/themes/hexo-theme-butterfly/_config.yml.bak
mv /home/runner/work/blog/blog/themes/hexo-theme-butterfly/tmp_config.yml /home/runner/work/blog/blog/themes/hexo-theme-butterfly/_config.yml
ls -al

后续可以通过往blog中提交代码,自动部署到博客仓库了。
but,没有感知到新的博客文件,很失望!
所幸,同事让我切换到vercel。接入非常快!

切换vercel

方法是 拷贝博客仓库(含源文件),包含theme文件夹,推到远端仓库a
登录vercel官网,使用github认证,导入个人仓库a,使用hexo编译
就能立即获得博客。

引用

1. 预部署文件渲染失败解决方案
2. hexo butteryfly设置
3. 配置友链
4. 接入博客
5. gitalk 未找到相关的Issues进行评论解决方法
6. 切换action部署1
7. 切换action部署2