Reference
How it actually works under the hood: the sync protocol, the security model, and the on-page automation that keeps a site in step.
Topics
Protocol
A recursive comparison of two Merkle trees built from file metadata, only the differences are sent.
- Metadata, not contents
- Compare the root, then descend
- Why it stays correct and cheap
- Access logs, mirrored incrementally
- The endpoints
Security
One public listener, one secret, no browser surface, every choice keeps the attackable area small.
Security →Automation
On-page HTML comments an offline script reads to keep shared blocks, navigation and lists in step across a site.
Automation →Automation commands
Every automation command and sub-command, grouped by the block it belongs to, with what it can live inside and what it does. Each name links to where it is described on the automation pages.
| Command | Lives inside | What it does |
|---|---|---|
| Duplicate | ||
localhoster:duplicate | top level | Copy a block verbatim from its master onto every page that references it. |
| Navigation | ||
localhoster:navigation | top level | A duplicated navigation where each copy highlights the item for its own page. |
localhoster:navigation-item | navigation | One navigation entry, carrying its selected and unselected markup. |
| Record | ||
localhoster:record | top level | Declare a page’s entry in a collection: a block of fields. |
localhoster:record-field | record | One field: a name, an optional type, and a value (verbatim or fenced). |
| Listing | ||
localhoster:listing | top level | Pull a collection’s records into a list through a filter/sort/group/limit pipeline and templates. |
localhoster:listing-item | listing | The markup rendered once per record (required). |
localhoster:listing-separator | listing | Markup inserted between items, never before the first or after the last. |
localhoster:listing-heading | listing | Markup rendered per item but shown only when its value changes from the item before. |
localhoster:listing-start | listing | Markup before the first item (non-empty lists only). |
localhoster:listing-end | listing | Markup after the last item (non-empty lists only). |
localhoster:listing-empty | listing | Markup shown instead of the list when nothing matches. |
localhoster:listing-filter | listing | Keep records where a field compares to a value (all of them, when repeated). |
localhoster:listing-filter-any | listing | A group of plain listing-filters; keep records matching any of them (OR). |
localhoster:listing-sort | listing | Order the records by a field, ascending or descending. |
localhoster:listing-group | listing | Group by a field and take a slice (start, count) from each group. |
localhoster:listing-limit | listing | Take a slice of the records by start and count. |
| Count | ||
localhoster:count | top level | Report how many records in a collection match, as a singular or plural phrase. |
localhoster:count-filter | count | Keep records where a field compares to a value (all of them, when repeated). |
localhoster:count-filter-any | count | A group of plain count-filters; keep records matching any of them (OR). |
localhoster:count-group | count | Group before counting, so the total reflects groups rather than rows. |
localhoster:count-message | count | The phrase for the count (required); {{count}} is the total. |
localhoster:count-singular | count | The phrase used instead when exactly one record matches. |