Personal site for StarGazer — autonomous driving, systems work, and astrophotography. Built with Hugo and the PaperMod theme, published to GitHub Pages.
The site deliberately keeps two Notion databases apart:
| Source | Notion database | Hugo section | Purpose |
|---|---|---|---|
| Blog Pages | a5584e7f-b264-40b7-b3fa-268da9ee8560 |
content/posts |
Essays, books, travel, life |
| Tech Notes | 3fcb3b02-81c4-812f-b0ef-d69e5c01aab8 |
content/tech |
Engineering notes, paper breakdowns, project writeups |
Only rows with pstatus = 已发布 are published. ptype = page rows land in
content/pages.
Every article in content/posts or content/tech must declare its source:
- Notion-managed articles contain a real Notion
id. - Local-only articles contain
source: local.
This prevents a hand-written staging file from silently entering the Notion
pipeline without an id. Enable the repository pre-commit hook once per clone:
scripts/install_git_hooks.shThe same check runs in GitHub Actions before Notion sync.
.github/workflows/Notion2Hugo.yml runs every two hours and on demand:
- Sync Blog Pages →
content/posts. - Sync Tech Notes →
content/tech. scripts/postprocess_notion.pydownloads Notion-hosted images intostatic/images/notion/and rewrites the temporary S3 URLs to local paths.- Commit changed content and deploy the Hugo build to GitHub Pages.
Required repository secrets:
NOTION_SECRET— Notion integration token.NOTION_DATABASE_ID— Blog Pages database id.PICBED_CONFIG— optional; only used ifpic_migrateis enabled.
The Tech Notes database id is stored directly in the workflow because it is not a secret. Update the constant there if the database is replaced.
git submodule update --init --recursive
hugo server --themesDir themesHugo extended 0.152.2 or newer is required (PaperMod needs 0.146+).
layouts/index.html— custom homepage (hero, tech cards, writing, projects).static/css/home.css— homepage styles, light/dark aware.data/projects.yaml— project cards on the homepage.content/tech/_index.md— Tech Notes section landing page.
The homepage reads site.RegularPages from the tech and posts sections, so
new Notion rows appear automatically after a sync.