搭建自己的github-Page

生成SSH Key

1
ssh-keygen -t rsa -C "github绑定邮箱"

image-20250513195944784

验证

1
ssh -T git@github.com

image-20250513200229358

新建自己的仓库

image-20250513191047737 image-20250513191120846 image-20250513191210372

image-20250513191358245

image-20250513191544994

image-20250513191602647

下载git

下载链接:https://git-scm.com/downloads/win

参考链接:https://blog.csdn.net/qq_39809160/article/details/145712755

image-20250513193916850

搭建本地博客

创建博客目录

image-20250513194127783

安装hexo

1
npm install -g hexo/cli

image-20250513194449943

1
2
#创建一个新的hexo项目
hexo init myblogs

image-20250513194437222

此时的目录结构

image-20250513194514738

image-20250513194607097

1
2
cd myblogs
npm install

此时项目结构

image-20250513194652661

运行hexo项目

1
hexo server

image-20250513194810234

部署到github

获取个人token

image-20250513202956141

image-20250513203016847

image-20250513203107908

打开_config.yml

image-20250513195002094

image-20250513200438571

编辑_config.yml

image-20250513203319107

当前博客目录安装git插件

1
npm install hexo-deployer-git --save

最后

1
2
3
4
5
6
hexo clean      # 清理 Hexo 缓存:
hexo generate # 重新生成静态文件
#hexo deploy这步之前要先验证身份
#git config --global user.email "272510545@qq.com"
#git config --global user.name "blkheadfish"
hexo deploy # hexo deploy

image-20250513201340009

博客路径

image-20250513201657835

博客配置项

在_config.yml中

修改浏览器tab页标题

image-20250513202340423

1
2
#部署到github
hexo g -d

image-20250513201746360