feat(cms): U3 derive article dates from content/ front-matter

Replace the hand-maintained ARTICLE_DATES registry as the source of
truth with dates read from content/ front-matter, so publishing a post
via the CMS needs no manual registry edit (plan R4).

- tools/content_index.py: load_dates() reads content/ front-matter into
  {source_folder/slug: {published|modified: iso}}. Standalone (os+yaml),
  no import cycle with seo_inject.
- tools/seo_inject.py: ARTICLE_DATES is now {**static_fallback,
  **content_dates}; content wins. The static table is kept only as a
  fallback for entries not present in content/.
- migration now preserves the published-vs-modified distinction
  (date_type), so the switch is byte-identical: content-derived dates
  equal the old static table exactly (17/17, incl. the one 'modified').

Verified: full `seo_inject --all --sitemap` + build_listings +
build_botlinks run produces ZERO changes to any site page. build_content
--check still reproduces all 51 pages.

build_botlinks.py needs no change (it scrapes built pages, which are a
pure function of content/). Listings get content-driven dates for free
via seo_inject.ARTICLE_DATES.

tools/tests/test_content_index.py: 5 tests (dates == legacy registry,
merged registry unchanged, published/modified distinction, events key on
projects/<slug>, one ISO date per entry).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
popovskikandClaude Opus 4.8 committed 2026-08-08 16:47:03 +02:00
1 parent 596290acf8
commit 8ff968739a
9 files changed
+174 -14

No files matched your search

@@ -7,6 +7,7 @@ title: How to open a Slovenian bank account as an international student
subtitle: 'A practical guide for Macedonian students: the documents you need, how to choose a bank, using Flik, and keeping your details up to date after you open the account.'
category: Student life
date: '2026-08-01'
date_type: modified
date_line: Student life · Last checked 1 August 2026
hero:
src: /images/blog-slovenian-bank-account.webp
@@ -7,6 +7,7 @@ title: Како да отворите словенечка банкарска с
subtitle: 'Практичен водич за македонските студенти: документите што ви требаат, како да изберете банка, користење на Flik и ажурирање на вашите податоци откако ќе ја отворите сметката.'
category: Студентски живот
date: '2026-08-01'
date_type: modified
date_line: Студентски живот · Последно проверено 1 август 2026
hero:
src: /images/blog-slovenian-bank-account.webp
@@ -7,6 +7,7 @@ title: Kako odpreti slovenski bančni račun kot mednarodni študent
subtitle: 'Praktičen vodnik za makedonske študente: dokumenti, ki jih potrebujete, kako izbrati banko, uporaba Flik in posodabljanje podatkov po odprtju računa.'
category: Študentsko življenje
date: '2026-08-01'
date_type: modified
date_line: Študentsko življenje · Zadnjič preverjeno 1. avgust 2026
hero:
src: /images/blog-slovenian-bank-account.webp