Source for my personal blog, built with Hexo 7.3 and the
default landscape theme. The published site lives at
https://bokeshiling.github.io.
source/_posts/ Markdown posts (the only content directory in use)
scaffolds/ Templates used by `hexo new`
_config.yml Site-wide Hexo configuration
.github/workflows/ GitHub Actions deployment pipeline
themes/ Empty — theme is installed via npm, not vendored here
Generated output (public/, db.json, .deploy_git/) is gitignored. It
gets rebuilt from source on every push, so there is nothing to commit by hand.
npx hexo new post "My post title"This creates source/_posts/My-post-title.md from scaffolds/post.md.
Existing posts use Chinese titles directly as filenames — that works fine.
Each post needs Hexo front-matter at the top:
---
title: 参观寺庙见女师傅诵经有感
date: 2026-05-21 10:00:00
tags:
---The site permalink format is :year/:month/:day/:title/, so the date
field determines the URL. Changing date on an already-published post
will change its URL and break inbound links.
npm install # first time only
npm run server # serves at http://localhost:4000 with live reload
npm run build # one-off static build into public/
npm run clean # clear public/ and db.json if the build gets stuckThere is no npm run deploy — deployment is automatic (see below). Do not
add hexo-deployer-git back; the old hexo deploy flow would push generated
output directly to main and overwrite the source.
Every push to main triggers .github/workflows/deploy.yml:
- Checkout the repo
npm installnpx hexo generate→ producespublic/- Upload
public/as a GitHub Pages artifact actions/deploy-pagespublishes it
The repo's Settings → Pages → Source must be set to "GitHub Actions" (not "Deploy from a branch"). If that setting drifts back to a branch, the workflow will succeed but the live site will stop updating.
- The repo previously used a two-branch layout (
sourcefor Markdown,mainfor generated HTML) withhexo deploypushing tomain. That flow has been retired. The oldmainwas deleted andsourcewas renamed tomain, so the currentmainis the source branch. - Windows downloads sometimes leave
*:Zone.Identifierfiles next to posts insource/_posts/. They are zero-byte NTFS alt-streams and should be deleted; Hexo will warn about them otherwise.