Repository navigation
fix(render): read a page's dates from the fields its workspace stamps - #13
Merged
adammharris merged 1 commit intoOct 21, 2026
Conversation
plates-render read a page's creation and edit dates by the literal names `created` and `updated`, while prov now has a workspace declare which fields it stamps (`fields.<name>.stamp: create` / `edit`). An archive stamping `modified` published its pages with no edit date. `SiteOptions::date_fields` takes a `DateFields` naming the stamped fields, and `plates-cli` fills it from the config's `created_field()` and `updated_field()`. The literal names stay the fallback page by page, so a workspace declaring no stamp reads as before. Closes the last step of follow-prov-vocabulary-shape-and-term-holds. Behavioural-change: a page in an archive whose config stamps a field other than `created` or `updated` now shows that field's date — in `article:published_time`/`article:modified_time`, feeds, the sitemap and a template's `entries` — where it showed none or the literal field's. Behavioural-change: `plates_render::site::SiteOptions` has a new public field, `date_fields`; a caller building it with a struct literal and no `..SiteOptions::default()` must name it.
adammharris
deleted the
agent/backlog-follow-prov-vocabulary-shape-and-term-holds
branch
October 30, 2026 01:25
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
plates-render: a new publicDateFields { created, updated }and a new field,SiteOptions::date_fields. A page'screated/updated, and the date on its entry record, are read through it: the stamped field first, then the literalcreated/updatedfor that page. The default isNone/None, which reads exactly as before.plates-cli:build_sitesfillsdate_fieldsfromsession.config.created_field()/updated_field().docs/tasks/follow-prov-vocabulary-shape-and-term-holds.mdis markeddone.Why
prov now has a workspace declare its stamped fields (
fields.<name>.stamp: create/edit), but plates-render still looked for the literal namescreatedandupdated. So an archive that stampsmodifiedpublished pages with no edit date inarticle:modified_time, feeds, the sitemap or templateentries. This was step 7 of the task, and the last one left.The literal names stay a per-page fallback, not just a per-workspace one. A page written before the workspace declared a stamp keeps its dates, and so does a page mounted from a peer that stamps the literal names. (A mounted peer that stamps some other name is still read with the host's names. Fixing that would mean carrying the fields per source, which this PR doesn't do.)
API note:
SiteOptionsgains a public field, so a caller that builds it with a struct literal and no..SiteOptions::default()has to name the field. This is recorded in aBehavioural-change:trailer.Closes
docs/tasks/follow-prov-vocabulary-shape-and-term-holds.md(step 7, the last one).Verification
plates-render:a_page_reads_its_dates_from_the_fields_its_workspace_stampsandan_entry_record_is_dated_by_its_stamped_field. Inplates-cli:a_page_shows_the_date_its_archive_stamps, an end-to-end build of an archive withfields.modified.stamp: edit, which failed with the wiring disabled.a_page_without_the_stamped_field_falls_back_to_the_literal_namepins the fallback.ship ciran all 7 jobs locally (fmt, clippy, test, docs, wasm, alone, msrv), and all passed.