Replace data/issues.json with content/_index.md files per issue

Issue metadata (title, description, season, status) now lives in
content/issues/XX/_index.md. terms.html reads from those pages via
$.Site.GetPage, driven by issueIds param in hugo.toml. Removes the
JSON data file and its generation from import-posts.py.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-18 18:48:27 +02:00
parent c766bba028
commit 869e3e00d2
6 changed files with 27 additions and 77 deletions
-36
View File
@@ -5,7 +5,6 @@ Only imports posts whose generated_image exists in the selected images folder.
Run from the site root: python3 scripts/import-posts.py
"""
import csv
import json
import os
import shutil
from pathlib import Path
@@ -15,10 +14,8 @@ CSV_PATH = GINGER / "posts.csv"
IMG_DIR = GINGER / "images" / "final" / "selected"
SITE = Path(__file__).parent.parent
CONTENT = SITE / "content" / "posts"
DATA_DIR = SITE / "data"
CONTENT.mkdir(parents=True, exist_ok=True)
DATA_DIR.mkdir(parents=True, exist_ok=True)
# Collect available images
available = {f.name for f in IMG_DIR.iterdir() if f.is_file()}
@@ -82,36 +79,3 @@ tags:
(bundle / "index.md").write_text(md, encoding="utf-8")
print(f"Created {len(matched)} page bundles in {CONTENT}")
# Write data/issues.json
issues = [
{
"id": "01",
"number": "№ 01",
"title": "Fabric, Light & Gesture",
"season": "Spring MMXXVI",
"publishedAt": "2026-03-21",
"blurb": "The inaugural plates — one hundred photographs gathered across ateliers, streets, and quiet hotel corridors.",
"status": "current"
},
{
"id": "02",
"number": "№ 02",
"title": "The Glasshouse",
"season": "Summer MMXXVI",
"publishedAt": "2026-06-21",
"blurb": "Forthcoming — a study in transparency, condensation, and the long late light of June.",
"status": "forthcoming"
},
{
"id": "03",
"number": "№ 03",
"title": "Atelier After Hours",
"season": "Autumn MMXXVI",
"publishedAt": "2026-09-22",
"blurb": "Forthcoming — the slow work of cloth and thread, photographed when the studio is half-empty.",
"status": "forthcoming"
}
]
(DATA_DIR / "issues.json").write_text(json.dumps(issues, indent=2), encoding="utf-8")
print("Wrote data/issues.json")