feat: news system v1 — dated news items, List module, paginated news list, RSS (harness add news) #80
No reviewers
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Cloonar/deckle!80
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "afk/79"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Implements the TYPO3-news-style news system designed in the 2026-07-17 grilling session, as six self-contained commits in dependency order (each builds and passes tests on its own):
datetimefield type end-to-end: RFC3339 strings through sidecar load, save validation, coercion, and a native datetime-local picker with pure RFC3339↔local conversion helpers (step=1avoids native constraint validation silently blocking submits on seconds-bearing values). AGENTS.md drift test covers the new vocabulary.childOrder: date-desc(tree children ordered newest-first, manual reorder rejected server-side),hideChildPages(flag only — children stay in the tree payload so route repair and the List module can see them), anddefaults(validated creation-time front matter; the news type stampsoutputs: [html, rss]). Date decoding + effective-type resolution ininternal/pagetree, mirrored from pageops.fieldsparam onPOST /api/page/create; tree stops drawing hidden children and disables reorder where dates own the order; Page module gains an "Open list" affordance.scaffold/features/news/): news/news-item page types,news-listelement (successor to page-teasers, latest-N with section+limit params), paginated newest-first section list with the theme's first pager partial, branch-bundle-aware detail template, and a per-section RSS feed opted in via front matter — the scaffold's global no-feeds stance is untouched, verified by a real-Hugo fixture build (pagination, buildFuture, sole index.xml).harness add <feature>: vendors a bundle into an existing site all-or-nothing (conflict refusal before any write), surgically insertsbuildFuture = trueas a top-level hugo.toml key before the first table, and prints the remaining manual wiring (allowlistnewsin a parent type'schildren). Documented in the scaffolded AGENTS.md.Verification
go vetandtsc --noEmitclean.harness serveon a freshly init'd +add newssite): section creation stampsoutputs: [html, rss]; items hidden from the tree but managed date-sorted in the List module; enable via the new toggle; rendered/news/lists newest-first including a year-2100 item (buildFuture);/news/index.xmlis the site's only feed with all items; disable/delete round-trips keep the preview truthful.Deliberate judgment calls (the two spots triage left open): the List create dialog collects title + the child type's required fields only, atomically via create-with-fields; the hugo.toml edit is a byte-preserving top-level key insertion, refusing nothing and idempotent when the key exists.
Closes #79
Validation verdict: PASS
Verification signal relied on: Forgejo Actions CI
ci / build-and-test— success (run #69, 5m39s). Not re-run. Its scope covers the full Go suite (incl. the real-Hugo theme build gate and the addcmd build gate), the web suite (773 tests),go vet,tsc --noEmit, and theinternal/element/agentsdoc_test.goAGENTS.md drift test.Conventions: Title is Conventional Commits (
feat:). Six self-contained commits, one surface each, in the dependency order triage requested.Closes #79present and well-formed on anafk/79head — the merge will auto-close the issue and release the run's claim.Diff review — the two spots triage left to conservative judgment both check out:
hugo.tomledit (internal/addcmd/buildfuture.go): a real top-level TOML scanner, not a blind append — insertsbuildFuture = trueafter the last top-level key and before the first table (a naive append would scope it inside[outputs]), idempotent when the key already exists (leaves the file byte-identical), and it refuses the edit on any unrecognized top-level line. Fail-safe.theme_test.go:359as the issue suggested, news ships as an isolatedscaffold/features/news/bundle with its ownnews_test.go; the base scaffold keeps zero feeds and its assertion stays valid unchanged. Cleaner than the proposed relaxation, and CI proves both pass.harness addsafety: all-or-nothing — pre-scans every destination and refuses the whole op with aConflictErrorbefore writing a byte;features/is excluded frominit; prints the manual wiring left (allowlistnewsin a parent type'schildren).Mergeable, no conflict with
main. Clean — awaiting explicit free-text merge go-ahead.