hexo+github+cloudflare
Domain github.io or pages.dev
GitHub
Cloudflare
vscode install
nodejs install
win+R1
2node -v
npm config set registry https://mirrors.huaweicloud.com/repository/npm/1
Set-ExecutionPolicy RemoteSigned1
sudo chown -R $(whoami) $(npm config get prefix)/{lib/node_modules,bin,share}git install
git bash
1
2
3git config -l //查看所有配置
git config --system --list //查看系统配置
git config --global --list //查看用户(全局)配置设置用户
1
2git config --global user.name username
git config --global user.email user@email.comkey
1
ssh-keygen -t rsa -C user@email.comc:/用户/.ssh
id_rsa - 私
id_rsa.pub - 公
GitHub右上角头像→settings→ssh and gpg keys→new ssh key
title hexo专用
key id_rsa.pub
测试连接1
ssh -T git@github.comAre you sure you want to continue connecting (yes/no/[fingerprint])?
创建github.io
+→new repository→username.github.io→public→create repositoryPC
c:hexo-blog→git bash1
npm install -g hexo-cli && hexo -v初始化hexo
1
2
3
4hexo init blog
cd blog
npm i
hexo cl && hexo s挂载到github pages
hexo-deployer-git install1
npm install hexo-deployer-git --save_config.yml
1
2
3
4deploy:
type: git
repository: git@github.com:username/username.github.io.git
branch: main
hexo clean:删除之前生成的文件,可以用hexo cl缩写。
hexo generate:生成静态文章,可以用hexo g缩写
hexo deploy:部署文章,可以用hexo d缩写
hexo+github+cloudflare
http://example.com/2025/05/23/hexo-github-cloudflare/