Docs
Everything you need to build and extend a PhlatPage site — from page structure and routing to views, fields, and the override system.
Documentation
PhlatPage is small enough to be learnable by reading the source. These docs cover the core concepts and conventions so you can move quickly without guessing.
Topics
- Getting Started — install, configure, and serve your first site
- Pages — how content is stored, structured, and retrieved
- Routing — how URLs map to handlers and views
- Views — Latte templates, layout inheritance, and the render pipeline
- Fields — typed content fields and custom field types
- Controllers — injecting data into views at render time
- Override System — customising and extending framework defaults
- Event Hooks — observing app lifecycle events from addons
Key ideas
PhlatPage is designed around a small number of concepts that repeat everywhere:
Pages are folders. A page lives at site/pages/{slug}/. Its URL is its folder path. Content is in data.json; structural metadata is in index.json.
Views are view-scoped. A page's view property ties it to a template, a router, a controller, and a set of field type declarations — all named after the view.
site/ overrides phlat/. Every framework default can be replaced by dropping a matching file in site/. No config required.
Hypermedia-first. Routes return HTML, not JSON. HTMX consumes fragments at clean URLs. The URL pattern is the API.