博客维护手册
这篇文章记录博客的日常维护方式,方便以后快速修改配置、写文章和发布。
常用位置
- 站点信息:
_config.yml - 主题配置:
_config.butterfly.yml - 自定义样式:
source/css/custom.css - 文章目录:
source/_posts/ - 图片目录:
source/img/ - 页面目录:
source/about/、source/photos/、source/resources/、source/thoughts/ - GitHub Pages 部署:
.github/workflows/pages.yml
新建文章
1 | npx hexo new post "文章标题" |
文章开头建议保留这些字段:
1 |
|
本地预览
1 | npm run clean |
浏览器打开:
1 | http://localhost:4000 |
发布
1 | git add . |
推送后 GitHub Actions 会自动构建并发布到 GitHub Pages。
本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 memnotop的博客!
