AJAX and fragments
AJAX is optional: public forms on this site are plain POST + redirect, and the engine ships no JavaScript on public pages except the small home-page demo.
When a page needs partial updates (a “show more” list, a filter block), use a fragment route: keep the block in its own template file, declare it as a partial (so the page can include it with {{> name}}) and point a route at the same file — that route serves the bare block, without the skeleton, to fetch/htmx/whatever you prefer:
"partials": { "items_block": { "hbs": "parts/items.hbs", "views": { "rows": "item_list" } } },
"routes": [
{ "type": "page", "path": "/", "hbs": "index.hbs" },
{ "type": "page", "path": "/frag/items", "hbs": "parts/items.hbs", "view": "item_list" }
]One source of markup, two uses: the home page includes the block inline, and GET /frag/items?cursor=… returns the same block alone. A fragment template simply does not wrap itself in {{#> _layout}} — that is the whole difference.