https://github.com/johannschopplich/nuxt-kql
🫧 Kirby's Query Language API for Nuxt
https://github.com/johannschopplich/nuxt-kql
kirby-cms kirby-plugin kirby4 kirby5 nuxt nuxt-module
Last synced: 3 months ago
JSON representation
🫧 Kirby's Query Language API for Nuxt
- Host: GitHub
- URL: https://github.com/johannschopplich/nuxt-kql
- Owner: johannschopplich
- License: mit
- Created: 2022-06-10T10:18:07.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2025-02-19T12:44:40.000Z (4 months ago)
- Last Synced: 2025-04-02T13:18:50.303Z (3 months ago)
- Topics: kirby-cms, kirby-plugin, kirby4, kirby5, nuxt, nuxt-module
- Language: TypeScript
- Homepage: https://nuxt-kql.byjohann.dev
- Size: 3.56 MB
- Stars: 42
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
[](https://nuxt-kql.byjohann.dev)
# Nuxt KQL
[Nuxt](https://nuxt.com) module for [Kirby's Query Language](https://github.com/getkirby/kql) API.
- [✨ Release Notes](https://github.com/johannschopplich/nuxt-kql/releases)
- [📖 Read the documentation](https://nuxt-kql.byjohann.dev)## Features
- 🔒 Protected Kirby credentials when sending queries
- 🪢 Supports token-based authentication with the [Kirby Headless plugin](https://github.com/johannschopplich/kirby-headless) (recommended)
- 🤹 No CORS issues!
- 🍱 Handle request just like with the [`useFetch`](https://nuxt.com/docs/getting-started/data-fetching/#usefetch) composable
- 🗃 Cached query responses
- 🦦 [Multiple starter kits](https://nuxt-kql.byjohann.dev/guide/starters) available
- 🦾 Strongly typed## Setup
> [!TIP]
> [📖 Read the documentation](https://nuxt-kql.byjohann.dev)```bash
npx nuxi@latest module add kql
```## Basic Usage
> [!TIP]
> [📖 Read the documentation](https://nuxt-kql.byjohann.dev)Add the Nuxt KQL module to your Nuxt config:
```ts
// `nuxt.config.ts`
export default defineNuxtConfig({
modules: ['nuxt-kql']
})
```And send queries in your template:
```vue
const { data, refresh, error, status, clear } = await useKql({
query: 'site'
})
{{ data?.result?.title }}
{{ JSON.stringify(data?.result, undefined, 2) }}
```
## 💻 Development
1. Clone this repository
2. Enable [Corepack](https://github.com/nodejs/corepack) using `corepack enable`
3. Install dependencies using `pnpm install`
4. Run `pnpm run dev:prepare`
5. Start development server using `pnpm run dev`## License
[MIT](./LICENSE) License © 2022-PRESENT [Johann Schopplich](https://github.com/johannschopplich)