This repository hosts a lightweight static blog site for GitHub Pages.
Markdown source files live in:
/Users/mengqing/code/mengqingcao.github.io/blog/source/_posts/
Each post should include front matter like this:
---
title: 文章标题
date: 2026-06-09 14:34:51
slug: your-post-slug
summary: 一句话摘要
tags: tag1; tag2
---Notes:
slugis required for publishingsummaryis used on the homepage listtagsshould be separated by;or,- Image paths should use site-relative paths such as
/img/example.png
The post builder script is:
/Users/mengqing/code/mengqingcao.github.io/scripts/build_posts.py
Run it from the repo root:
cd /Users/mengqing/code/mengqingcao.github.io
./scripts/build_posts.pyThis will:
- Read markdown posts from
blog/source/_posts/ - Generate article pages in
posts/<slug>/index.html - Rebuild the homepage article list in
index.html
To build only one post:
./scripts/build_posts.py blog/source/_posts/你的文章.mdAfter checking the generated files, commit and push:
git add README.md scripts/build_posts.py index.html posts/ blog/source/_posts/
git commit -m "Update blog posts"
git push origin masterOnly markdown files with a slug in front matter are treated as publishable posts by default.