# hexo + github 配置
之前用 readthedoc 感觉体验不好,又看到了 https://shoka.lostyu.me/computer-science/note/theme-shoka-doc/ 大佬的博客页面,本二次元跃跃欲试,就直接冲!
# 安装 hexo
hexo 基于 node.js,使用 npm 安装
1 | npm install -g hexo-cli |
主题安装参考 https://shoka.lostyu.me/computer-science/note/theme-shoka-doc/ (注意安装插件)
或者选用自己喜欢的主题
# hexo + github 配置
基于 Github pages 构建 hexo 博客
-
创建 github repositories
此处名称必须为
username.github.io
,否则出现 404https://github.com/hexojs/hexo/issues/350 -
进入 hexo root 目录
1
npm install hexo-deployer-git --save
-
编辑_config.yml 文件
1
2
3
4
5deploy:
type: 'git'
repo: https://github.com/username/username.github.io
# https://github.com/username/username.github.io.git
branch: main -
设置 github repositories
pages -> Build and deployment -> 设置 soure 为 main
可通过 GitHub Pages 访问或者直接访问
https://username.github.io
# hexo 使用
1 | git cmd command |
# 花里胡哨的功能
20241224
可设置随机图床,D:\0_Project\hexo\themes\shoka\config.yml
image_server: "https://api.paugram.com/wallpaper"
# 参考
https://shoka.lostyu.me/computer-science/note/theme-shoka-doc/
https://blog.csdn.net/weixin_43659725/article/details/125207383
https://blog.csdn.net/yaorongke/article/details/119089190