v0.39.0
2 November 2026
Pages can be kept level with an external source, and code and markdown fields return their source from decode().
Added
Page::sync($records, $prune = false)keeps a page's children level with an external source.$recordsmaps each child's slug to its data. A missing child is created, and the rest of the data is written to the child's_source.json, which a save never touches, so what an editor saved in_data.jsonstays over it.$prunedeletes the children that have a_source.jsonand are no longer in$records. The whole sync is one History entry.- A page's
_source.jsonis read under its_data.json, committed with the page and restored with its revisions. Page::withData($data)returns a copy of the page that reads$dataas its content, for showing and never saved.FieldValue::html()on a markdown field andFieldValue::highlight()on a code field return the rendered HTML.- A field inside a stack, blocks or repeater can use
site/views/fields/{view}/{parent}/{name}.latte, which is tried beforesite/views/fields/{view}/{name}.latte.
Changed
decode()on a code or markdown field, and$valuein itsrender.latte, hold the stored source instead of HTML.{$page->field}and|renderprint the same as before.History::pageAt()is nowHistory::revision(), and a revision is the page itself with its content swapped throughPage::withData().
Removed
- The
Phlat\History\Revisionclass.