b-log 是一個雙重用途的內容系統:既是部落格,也是待辦清單。它是一個受 WordPress 啟發的靜態發布系統,專為 GitHub Pages 設計。每篇文章都是 Markdown 檔案,元數據存儲在單一 JSON 檔案中,前端使用輕量級的 HTML、CSS 和原生 JavaScript 渲染。
index.html- homepage with featured article, stream, and widgets.post.html- article view that hydrates Markdown content client-side.assets/styles.css- theme styles (light and dark friendly).assets/main.js- loader for posts, hero, taxonomy widgets, and article utilities.content/posts/- Markdown sources (<slug>.md).data/posts.json- catalog consumed by the site and agents.feed.json- JSON Feed mirror for RSS readers.agent.md- operating manual for AI collaborators.
Add objects to data/posts.json with the following keys:
{
"slug": "stack-blueprint",
"title": "Blueprint: Launching b-log on GitHub Pages",
"summary": "Short teaser for the homepage stream.",
"category": "Playbook",
"author": "Jason Chien",
"publishedAt": "2025-10-16T00:00:00.000Z",
"updatedAt": "2025-10-16T00:00:00.000Z",
"readingTime": "3 min",
"tags": ["guides", "github-pages", "automation"],
"accentColor": "#1d9bf0",
"coverImage": "assets/covers/stack-blueprint.jpg"
}Only slug, title, summary, category, author, publishedAt, and tags are required. accentColor controls the gradient hero if no coverImage is supplied.
- Fork or clone the repository.
- Enable GitHub Pages (Settings > Pages > Deploy from
mainorgh-pages). - Update the URLs in
feed.jsonto match your Pages domain. - Commit and push. Pages serves everything without a build step.
- Duplicate a metadata object in
data/posts.jsonwith a new slug. - Write
content/posts/<slug>.mdin GitHub-flavoured Markdown. - Optional: add
coverImageor tweakaccentColorfor custom hero styling. - Update
feed.jsonto keep the feed in sync. - Commit the Markdown, JSON, and feed together.
- Adjust typography, spacing, or layout in
assets/styles.css. - Extend the sidebar by adding new widgets to
index.htmlandpost.html. - Override hero gradients per post via the
accentColorfield.
Share agent.md with your co-author bot. It describes:
- Naming conventions and markdown formatting.
- Required metadata fields and ordering.
- How to keep the feed and catalog aligned.
Review diffs before merging to keep the repo clean and auditable.