Skip to content

blog: move post registry to JSON + add iso_date#75

Merged
TeoSlayer merged 1 commit into
mainfrom
blog-admin-m0
Jul 3, 2026
Merged

blog: move post registry to JSON + add iso_date#75
TeoSlayer merged 1 commit into
mainfrom
blog-admin-m0

Conversation

@TeoSlayer

Copy link
Copy Markdown
Contributor

Enabling refactor for the blog-admin dashboard (M0). Makes the blog registry editable as data.

What

  • src/data/blogPosts.ts becomes a thin shim that imports src/data/blogPosts.json and re-exports blogPosts, the BlogPost interface (now with optional iso_date), and categories — unchanged public API.
  • All 105 posts moved into blogPosts.json with an additive iso_date (derived from date + year). date/year are untouched so RSS (feed.xml) and layouts render exactly as before.

Why

A JSON registry is byte-stable and diff-friendly, so a management dashboard can do CRUD on posts via atomic commits without rewriting a TS literal. iso_date gives sane ordering/sorting for tooling.

Verification

  • Built the site before and after; diffed all pages + feed.xml. Only differences were two build-nondeterministic tokens (the nav's live version string, present on every page, and the feed <lastBuildDate>). After normalizing those out: 0 files differ site-wide.
  • npm run check:plain passes.
  • 105 entries, all with iso_date, newest-first order preserved.

Convert blogPosts.ts to a thin shim over blogPosts.json so the registry is
data (byte-stable, diff-friendly) rather than a TS array literal. Backfill an
additive iso_date on all 105 entries (derived from date + year); date/year
left unchanged so RSS (feed.xml) and layouts render identically. Build output
verified byte-identical site-wide (0 diffs after normalizing build timestamps).
@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

🚀 Preview deployed to Cloudflare Pages

@TeoSlayer TeoSlayer merged commit c283cfb into main Jul 3, 2026
3 checks passed
@TeoSlayer TeoSlayer deleted the blog-admin-m0 branch July 3, 2026 11:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants