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>
|
||
|---|---|---|
| .gitea/workflows | ||
| assistant | ||
| content | ||
| css | ||
| docs | ||
| en | ||
| images | ||
| links-for-bots | ||
| mk | ||
| si | ||
| templates | ||
| tools | ||
| .gitignore | ||
| .htaccess | ||
| 404.html | ||
| README.md | ||
| apple-touch-icon.png | ||
| assistant.css | ||
| assistant.js | ||
| blog-filter.js | ||
| consent.js | ||
| export_code.sh | ||
| favicon-96x96.png | ||
| favicon.ico | ||
| favicon.svg | ||
| filter-search.js | ||
| guide-feedback.js | ||
| llms.txt | ||
| main.js | ||
| member-form.js | ||
| my-route.js | ||
| news-filter.js | ||
| optimize_images.py | ||
| robots.txt | ||
| site.webmanifest | ||
| sitemap.xml | ||
| student-guide.js | ||
| style.css | ||
| update_html.py | ||
| web-app-manifest-192x192.png | ||
| web-app-manifest-512x512.png | ||
README.md
msos spletna stran