News system v1: dated news items with list module, paginated section list, news-list element, RSS #79
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Cloonar/deckle#79
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
What to build
A TYPO3-news-style news system for deckle, designed in a grilling session on 2026-07-17. News items are pages as records: ordinary pages of a new type
news-itemunder a section of typenews(the sysfolder equivalent), reusing the entire existing pipeline (elements, RTE, generated forms, publish/undo, detail URLs). No separate record engine.Delivered as
harness add news— a new genericharness add <feature>command that vendors an embedded feature bundle into an existing site: page-type + element sidecars, theme templates (list, detail, pager, RSS), and surgicalhugo.tomledits (buildFuture = true). Machinery only: it does NOT create the news section; the developer/editor creates it via the page tree.New generic engine primitives (none news-specific)
datetimefield type — 8th member of the closed field-type set; RFC3339 stored in front matter, mapped to Hugo's nativedatekey for news items; date+time picker widget in the web UI. Triggers theinternal/element/agentsdoc_test.godrift test →scaffold/site/AGENTS.mdmust be updated in the same change.childOrderpage-type key (e.g.date-descon thenewstype) — honored identically by theme templates and the editor page tree (internal/pagetreemust decode dates); drag-to-reorder disabled where it applies, so editor order never lies about site order.hideChildPagespage-type key — children of such a section stay out of the page tree; managed via the List module instead.defaultspage-type key — creation-time front matter stamped on new pages of that type; thenewstype uses it foroutputs: [html, rss], scoping RSS to the news branch while the scaffold's global no-feeds stance stays untouched.web/src/modules.tsx): table of the selected tree item's direct child pages (title, type, date, draft/published status; edit/delete/create actions), sorted perchildOrder. Selecting ahideChildPagessection in the Page module still opens the section page normally, with a visible hint/affordance linking to the List module.News content model
news-itemfields beyond title + element body:datetime(publish date, drives ordering),teaser(textarea; used in lists/feed, falls back to truncated body), featuredimage(existing image field type / media library),author(plain text field).Front-end (theme bundle)
.Paginate(default page size ~10, configurable in hugo.toml); pager partial (first use of pagination in the theme).news-listelement — placeable successor topage-teaserswith params section + limit, rendering "latest N news" on any page (e.g. homepage).news-itemsingle template: date, title, featured image, author, body elements.outputsdefault above); RSS template added to the theme;internal/theme/theme_test.go:359(asserts zero feeds) relaxed accordingly.buildFuture = true: a future-dated item is visible immediately once published — what the editor sees is what is live (real scheduling deferred, see #78).Explicitly out of scope for v1
Acceptance criteria
harness add newsvendors the news bundle into an existing site (never overwrites), editshugo.toml(buildFuture = true), and the site builds with plain Hugo afterwardsdatetimefield type exists end-to-end (schema, canonicalization, generated form widget) and is documented inscaffold/site/AGENTS.md(drift test passes)childOrder,hideChildPages, anddefaultspage-type keys implemented and documented in AGENTS.mdnewsvia the editor stampsoutputs: [html, rss]from the page type'sdefaultsnews-listelement; drag-reorder is disabled for date-ordered childrenhideChildPages); the Page module shows an affordance to the List module for such sectionsnews-listelement renders latest N on any page; detail page shows date, teaser/image/author, bodybuildFuture = true)Blocked by
None - can start immediately
Implementation note (from triage): this issue is intentionally one end-to-end slice spanning five surfaces. To keep the resulting PR reviewable, implement it as a sequence of self-contained commits in dependency order, one surface per commit:
datetimefield type end-to-end (Go schema, canonicalization, form widget, drift test, AGENTS.md)childOrder,hideChildPages,defaults+ date-aware sorting ininternal/pagetree(AGENTS.md)news-listelement, RSS template + theme test updatesharness add <feature>command vendoring the news bundle, incl. surgicalhugo.tomledit (buildFuture = true)Each commit should build and pass tests on its own. Judgment calls to make conservatively (they are the two spots not fully pinned by the spec): the List module's create flow UX, and how
harness addeditshugo.toml. Verify the editor surfaces end-to-end with the playwright-core + nix chromium recipe againstharness serve, not only unit tests.