posts/holds Org sources, including special pages (about.org,404.org,index.org,index-cn.org).- Post files use date-first names like
YYYY-MM-DD-slug.org; Chinese variants use-cn.org. static/contains site assets (css/,js/,favicon.svg,robots.txt) copied topublic/static/during builds.templates/post-template.orgis the starter template for new posts.build.eldefines Org publish logic;build.sh,minify.sh, andgenerate-sitemap.shorchestrate CLI builds.public/is generated output; do not edit it manually.
npm ci: install Node-based tooling.make buildornpm run build: generate HTML intopublic/.make build-prodornpm run build:prod: build plus asset minification.make serveornpm run serve: servepublic/locally athttp://localhost:8000.make dev: watchposts/andstatic/and rebuild on change (inotifywaitrequired).npm run format: format JS/CSS/JSON/Markdown/YAML.npm run format:check: CI-style formatting check.
- Prettier config (
.prettierrc): 2-space indentation, single quotes, semicolons, 100-column width, LF endings. - Shell scripts should use
bash+set -euo pipefailand remain ShellCheck-clean. - Org posts must include
#+TITLE,#+AUTHOR, and#+DATE; use#+DRAFT: truefor unpublished work. - Keep filenames kebab-case and date-prefixed (example:
2026-02-12-my-post.org).
- There is no unit-test suite; quality gates are lint/build checks.
- Run before push:
./build.shshellcheck *.sh(and any modified shell scripts)npm run format:check
- CI additionally validates Org metadata and checks generated HTML internal links.
- Follow existing history style: short, imperative commit subjects (for example,
fix lint,update about,refactor). - Keep commits focused; separate content changes from tooling refactors when possible.
- PRs should include: concise change summary, linked issue (if applicable), screenshots for UI/content styling changes, and confirmation that local checks pass.
- Start from
.blogrc.example; keep personal or deployment-specific values in.blogrc/environment variables. - Do not commit secrets; CI and publish workflows already read values like
BLOG_URL,BLOG_AUTHOR, andBLOG_EMAILfrom environment/secrets.