This plugin is designed for developers who want to use Kirby's backend to serve content to a frontend application, static site generator, or mobile application. You can either add headless functionality to your existing Kirby site, or use this plugin to build a headless-first CMS from scratch.
Note
Check out to the Kirby Headless Starter repository for a ready-to-use headless-only setup!
- 🧩 Optional bearer token authentication for KQL and custom API endpoints
- 🧱 Resolve fields in blocks: UUIDs to file and page objects or any other field
- ⚡️ Cached KQL queries
- 🌐 Multi-language support for KQL queries
- 😵 Built-in CORS handling
- 🍢 Express-esque API builder with middleware support
- 🗂 Return JSON from templates instead of HTML
The recommended way to install the plugin is via Composer. To install the plugin, run the following command in your terminal:
composer require johannschopplich/kirby-headless
Head over to the releases page and download the latest version of the plugin as a ZIP file. Extract the contents of this ZIP file to your site/plugins
folder. It should look like this:
site/plugins/
├─ kirby-headless/
│ └─ … Plugin files
MIT License © 2022-PRESENT Johann Schopplich