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.

Protocol →

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.

CommandLives insideWhat it does
Duplicate
localhoster:duplicatetop levelCopy a block verbatim from its master onto every page that references it.
Navigation
localhoster:navigationtop levelA duplicated navigation where each copy highlights the item for its own page.
localhoster:navigation-itemnavigationOne navigation entry, carrying its selected and unselected markup.
Record
localhoster:recordtop levelDeclare a page’s entry in a collection: a block of fields.
localhoster:record-fieldrecordOne field: a name, an optional type, and a value (verbatim or fenced).
Listing
localhoster:listingtop levelPull a collection’s records into a list through a filter/sort/group/limit pipeline and templates.
localhoster:listing-itemlistingThe markup rendered once per record (required).
localhoster:listing-separatorlistingMarkup inserted between items, never before the first or after the last.
localhoster:listing-headinglistingMarkup rendered per item but shown only when its value changes from the item before.
localhoster:listing-startlistingMarkup before the first item (non-empty lists only).
localhoster:listing-endlistingMarkup after the last item (non-empty lists only).
localhoster:listing-emptylistingMarkup shown instead of the list when nothing matches.
localhoster:listing-filterlistingKeep records where a field compares to a value (all of them, when repeated).
localhoster:listing-filter-anylistingA group of plain listing-filters; keep records matching any of them (OR).
localhoster:listing-sortlistingOrder the records by a field, ascending or descending.
localhoster:listing-grouplistingGroup by a field and take a slice (start, count) from each group.
localhoster:listing-limitlistingTake a slice of the records by start and count.
Count
localhoster:counttop levelReport how many records in a collection match, as a singular or plural phrase.
localhoster:count-filtercountKeep records where a field compares to a value (all of them, when repeated).
localhoster:count-filter-anycountA group of plain count-filters; keep records matching any of them (OR).
localhoster:count-groupcountGroup before counting, so the total reflects groups rather than rows.
localhoster:count-messagecountThe phrase for the count (required); {{count}} is the total.
localhoster:count-singularcountThe phrase used instead when exactly one record matches.