参考文章:hexo+github.

开始

注册域名

创建仓库

安装nodejs

验证安装是否成功(其中npm为安装nodejs时附带,git安装自行百度)

1
2
3
$ node -v
$ npm -v
$ git --version

安装Hexo

1
2
$ npm install hexo-cli -g
$ hexo -v

初始化Hexo

新建文件夹myblog,右键git bash here

1
2
3
4
$ hexo init
$ npm install
$ hexo g
$ hexo s

此时在浏览器输入localhost:4000就可以看到生成的博客页面

修改内容

参考官方文档
注意需要如下修改

1
2
3
4
deploy:
type: git
repo: https://github.com/Alucard-9/Alucard-9.github.io.git
branch: main

部署项目

1
2
3
4
5
6
7
8
安装部署工具,方便以后更新
$ npm install hexo-deployer-git -save
初始化本地仓库
$ git init
连接远程仓库
$ git remote add origin https://github.com/Alucard-9/Alucard-9.github.io.git
发布hexo到github page(清空、刷新、部署)
$ hexo clean && hexo g && hexo d

Github Pages设置

域名解析

结束

设置yilia背景

甦傑
秦时
(註:article在2029行)

设置鼠标点击出现爱心效果

背景雪花飘落效果

Github图床设置

文章置顶

添加评论