Skip to content

API Reference ​

Four composables for fetching from Kirby, two server-side counterparts, and a set of types for the queries and responses that travel between. All composables are auto-imported by Nuxt and available globally in your project.

PageWhat it covers
Module ConfigurationThe options of the kirby key in your nuxt.config.ts.
useKqlReactive KQL queries with caching, for content queries that follow relationships and filter.
$kqlDirect KQL calls for programmatic use.
useKirbyDataReactive data fetching from the REST API with caching, for plain requests, file handling and endpoints of your own.
$kirbyDirect REST API calls for programmatic use.
Server Imports$kql and $kirby in server code, where they reach Kirby without the proxy.
Using TypesThe types for Kirby data and queries, and where each one applies.
Query TypesThe shape of a query and the models it may address.
Request TypesWhat you hand to useKql and $kql.
Response TypesWhat comes back, including pagination.

Released under the MIT License.