memnotop's ink

Back

这篇文章记录博客的日常维护方式,方便以后快速修改配置、写文章和发布。

常用位置#

  • 站点信息:_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

新建文章#

npx hexo new post "文章标题"
bash

文章开头建议保留这些字段:

---
title: 文章标题
date: 2026-05-31 00:00:00
categories: Technical
tags:
  - 标签
description: 一句话说明这篇文章解决什么问题。
cover: /img/default-cover.webp
---
yaml

本地预览#

npm run clean
npm run server
bash

浏览器打开:

http://localhost:4000
text

发布#

git add .
git commit -m "update blog content"
git push origin main
bash

推送后 GitHub Actions 会自动构建并发布到 GitHub Pages。

博客维护手册
https://memno.top/blog/2026/technical/7a24c421
Author memnotop
Published at 2026年5月31日