Skip to content

What is Nuxt Kirby?

Nuxt Kirby is a Nuxt module for seamless Kirby CMS integration. Fetch content with KQL (Kirby Query Language) for complex queries or direct API access for simple requests. Credentials stay protected, everything works server-side and client-side.

Two Ways to Fetch Data

Nuxt Kirby offers flexibility in how you access your Kirby content:

1. KQL (Kirby Query Language)

Perfect for complex content queries with relationships and filtering:

ts
const { data, error } = await useKql({
  query: 'site',
  select: ['title', 'children']
})

2. Direct Kirby API Access

Ideal for simple data fetching, file downloads, and custom endpoints:

ts
const { data, error } = await useKirbyData('api/pages/blog')

Both methods provide caching, error handling, and credential protection out of the box.

Kirby Headless Plugin

The Kirby Headless plugin simplifies headless Kirby setup. It provides a custom KQL endpoint with token authentication and handles common pitfalls like CORS. While optional, it's the recommended approach for headless Kirby. This module is designed to work seamlessly with it.

Features:

Next Steps

Released under the MIT License.