Hexo Template
一个快速、简洁且高效基于 Node.js的博客框架。 这是它的模板。
快速开始
在 _config.yml 的16行设置你的站点地址
例如,如果你使用Github Pages默认地址,可以设置为: https://username.github.io/projectname:
1 | url: https://lopins.github.io/hexo-template |
在 _config.yml 的107行设置你的项目ID
如果你的项目ID为 username or username.github.io, 你只需要在 _config.yml的最后一行设置:
1 | root: /hexo-template |
配置主题
- 拉取主题并进入
themes/并更新相关信息
git submodule add git@github.com:litten/hexo-theme-yilia.git themes/yilia && git submodule update --init --recursive
在
_config.yml中更新theme: yilia并且配置其他信息在
_config.yilia.yml或者进入themes/yilia中_config.yml文件配置主题相关
应用配置
git add . && git commit -m ':wrench:docs(themes): Add or update configuration files' && git push origin main
发布文章
- 启用站点
点击 “Use this template” -> “Create a new repository”
- 配置站点
设置并且启用 GitHub Pages 服务
- 发布文章
发布文章在 hexo 分支。
特别注意
使用 Submodule 切换主题
1 | # Add Submodule - Upadte Submodule |
权限问题
如果你遇到类似 remote: Permission to xxx denied to github-actions[bot].
当你推送更改时,你需要设置仓库的 github-actions[bot] 权限.
设置步骤: Settings -> Actions -> General -> Workflow permissions -> Read and write permissions -> Save.