Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/johannschopplich/nuxt-kql
𫧠Kirby's Query Language API for Nuxt
https://github.com/johannschopplich/nuxt-kql
kirby kirby-cms kirby-plugin nuxt nuxt-module nuxt3 nuxtjs
Last synced: 15 days 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 (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-04-06T09:37:04.000Z (7 months ago)
- Last Synced: 2024-04-07T09:40:47.836Z (7 months ago)
- Topics: kirby, kirby-cms, kirby-plugin, nuxt, nuxt-module, nuxt3, nuxtjs
- Language: TypeScript
- Homepage: https://nuxt-kql.byjohann.dev
- Size: 3.32 MB
- Stars: 38
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
[![Nuxt KQL module](./docs/public/og.jpg)](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
- π Protect your Kirby credentials when sending queries
- πͺ’ Supports token-based authentication with [Kirby Headless Starter](https://github.com/johannschopplich/kirby-headless-starter) (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)