Johann Schopplich Johann Schopplich

Headless

JSON pages and KQL queries, served behind one bearer token

Manual

Download

… and extract the folder to site/plugins/headless

Composer

Git Submodule

Features

🦭 One Token Guards the API
Set it in config.php, and every request for page JSON has to carry it, KQL requests too once KQL is set to bearer auth.
🧩 Cached KQL
`/api/kql` answers KQL queries, cached per query and language once Kirby's pages cache is on.
🗂 Pages Answer as JSON
Templates return JSON; with global routes on, every page URL serves it, drafts behind a preview token.
🧱 Resolved Blocks
`toResolvedBlocks()` turns image blocks into URL, dimensions, srcset, and alt text.
🦾 API Builder
Compose routes from middlewares: token and body checks, language, page, and file resolvers, and functions of your own.
Version
8.2.0
License
MIT
Stars
43
Kirby support
  • Kirby 5
  • Kirby 4
  • Kirby 3
More