Configuration · Nuxt AI Ready · Nuxt SEO

-
-
-
-

[Sign In](https://nuxtseo.com/auth/github)

[Nuxt SEO on GitHub](https://github.com/harlan-zw/nuxt-seo)

AI Ready

-
-
-
-
-
-
-
-
-
-

Search…```k`` /`

v1.1.2

- [Discord Support](https://discord.com/invite/275MBUBvgP)

### Nuxt API

-
-

### Nitro API

-
-

Nuxt API

# Configuration

[Copy for LLMs](https://nuxtseo.com/docs/ai-ready/api/config.md)

nuxt.config.ts

```
export default defineNuxtConfig({
  aiReady: {
    // options
  }
})
```

## [`enabled`](#enabled)

- **Type:** `boolean`
- **Default:** `true`

```
aiReady: {
  enabled: process.env.NODE_ENV === 'production'
}
```

## [`debug`](#debug)

- **Type:** `boolean`
- **Default:** `false`

Enable debug logging for module operations.

## [`mdreamOptions`](#mdreamoptions)

- **Type:** `MdreamOptions`
- **Default:** `{ minimal: true }`

Configure [mdream](https://github.com/harlan-zw/mdream) HTML-to-markdown conversion.

```
export default defineNuxtConfig({
  aiReady: {
    mdreamOptions: {
      minimal: true
    }
  }
})
```

## [`markdownCacheHeaders`](#markdowncacheheaders)

- **Type:** `{ maxAge?: number, swr?: boolean }`
- **Default:** `{ maxAge: 3600, swr: true }`

Cache settings for runtime markdown endpoints.

| Option | Type | Default | Description |
| --- | --- | --- | --- |
| `maxAge` | `number` | `3600` | Cache duration in seconds |
| `swr` | `boolean` | `true` | Stale-while-revalidate |

## [`llmsTxt`](#llmstxt)

- **Type:** `LlmsTxtConfig`
- **Default:** Auto-generated

Configure llms.txt generation.

```
export default defineNuxtConfig({
  aiReady: {
    llmsTxt: {
      sections: [
        {
          title: 'API Reference',
          links: [
            { title: 'REST API', href: '/docs/api', description: 'API docs' }
          ]
        },
        {
          title: 'Debug Endpoints',
          optional: true,
          links: [
            { title: 'Debug Route', href: '/__ai-ready-debug', description: 'Internal debugging' }
          ]
        }
      ],
      notes: 'Built with Nuxt AI Ready'
    }
  }
})
```

**LlmsTxtSection:**

| Property | Type | Description |
| --- | --- | --- |
| `title` | `string` | Section title |
| `description` | `string \| string[]` | Section description |
| `links` | `{ title, href, description? }[]` | Links in section |
| `optional` | `boolean` | Mark section as optional per llms.txt spec. Optional sections appear under `## Optional` and LLMs may skip them with shorter context windows. |

**LlmsTxtConfig:**

| Property | Type | Description |
| --- | --- | --- |
| `sections` | `LlmsTxtSection[]` | Custom sections |
| `notes` | `string \| string[]` | Notes at end |

## [`contentSignal`](#contentsignal)

- **Type:** `false | { aiTrain?: boolean, search?: boolean, aiInput?: boolean }`
- **Default:** `false`

Content Signal directives for robots.txt. See

.

```
export default defineNuxtConfig({
  aiReady: {
    contentSignal: {
      aiTrain: false, // Block training
      search: true, // Allow search indexing
      aiInput: true, // Allow RAG/grounding
    }
  }
})
```

## [`mcp`](#mcp)

- **Type:** `{ tools?: boolean, resources?: boolean }`
- **Default:** `{ tools: true, resources: true }`

Control MCP features when `@nuxtjs/mcp-toolkit` installed.

```
export default defineNuxtConfig({
  aiReady: {
    mcp: {
      tools: true, // list_pages, search_pages
      resources: true, // pages resource
    }
  }
})
```

See

 for tool/resource details.

## [`llmsTxtCacheSeconds`](#llmstxtcacheseconds)

- **Type:** `number`
- **Default:** `600` (10 minutes)

Cache duration for llms.txt route handlers. Uses stale-while-revalidate.

```
export default defineNuxtConfig({
  aiReady: {
    llmsTxtCacheSeconds: 3600 // 1 hour
  }
})
```

## [`database`](#database)

- **Type:** `{ type?: string, filename?: string, bindingName?: string, url?: string, authToken?: string }`
- **Default:** `{ type: 'sqlite', filename: '.data/ai-ready/pages.db' }`

Configure the [SQLite](https://sqlite.org) database for page storage. The module auto-detects the best connector based on runtime.

| Option | Type | Default | Description |
| --- | --- | --- | --- |
| `type` | `'sqlite' \| 'd1' \| 'libsql'` | `'sqlite'` | Database type |
| `filename` | `string` | `'.data/ai-ready/pages.db'` | SQLite file path |
| `bindingName` | `string` | `'AI_READY_DB'` | D1 binding name |
| `url` | `string` | - | LibSQL/Turso URL |
| `authToken` | `string` | - | LibSQL/Turso auth token |

Default (SQLite)

Cloudflare D1

Turso/LibSQL

```
export default defineNuxtConfig({
  aiReady: {
    database: {
      filename: '.data/ai-ready/pages.db'
    }
  }
})
```

```
export default defineNuxtConfig({
  aiReady: {
    database: {
      type: 'd1',
      bindingName: 'AI_READY_DB'
    }
  }
})
```

```
export default defineNuxtConfig({
  aiReady: {
    database: {
      type: 'libsql',
      url: process.env.TURSO_URL,
      authToken: process.env.TURSO_AUTH_TOKEN
    }
  }
})
```

**SQLite connector auto-detection:**

| Runtime | Connector |
| --- | --- |
| [Bun](https://bun.sh) | `bun:sqlite` |
| [Node.js](https://nodejs.org) 22.5+ | `node:sqlite` |
| Node.js <22.5 | `better-sqlite3` |

For serverless deployments, the module generates a compressed dump at build time that's restored on cold start.

**Table naming:**

All tables are prefixed with `ai_ready_` to avoid conflicts with existing database tables:

- `ai_ready_pages` - Main pages table
- `ai_ready_pages_fts` - FTS5 full-text search index
- `_ai_ready_info` - Schema version tracking

This allows safe use with existing D1/LibSQL databases without risk of overwriting user tables.

## [`cron`](#cron)

- **Type:** `boolean`
- **Default:** `false`

Enable scheduled cron task that runs every minute. When enabled, it automatically enables `runtimeSync` for background indexing and runs IndexNow sync if you configure `indexNow`.

```
export default defineNuxtConfig({
  aiReady: {
    cron: true
  }
})
```

## [`indexNow`](#indexnow)

- **Type:** `boolean| string`
- **Default:** `false`

Enable IndexNow for instant search engine notifications to Bing, Yandex, Naver, and Seznam.

```
export default defineNuxtConfig({
  aiReady: {
    indexNow: true
  }
})
```

A stable key is derived from your site URL. You can also provide a custom string if needed.

When enabled:

- Key verification route registered at `/{key}.txt`
- **Static sites**: Hash-based change detection at build time
- **SSR sites**: Sync via cron (when enabled) or `POST /__ai-ready/indexnow`
- Stats included in `/__ai-ready/status`

See

 for details.

## [`runtimeSyncSecret`](#runtimesyncsecret)

- **Type:** `string`
- **Default:**: (no auth required)

Secret token for authenticating runtime sync endpoints. When set, requires `Authorization: Bearer<token>` header for `/__ai-ready/poll`, `/__ai-ready/prune`, and `/__ai-ready/indexnow` endpoints.

```
export default defineNuxtConfig({
  aiReady: {
    runtimeSyncSecret: process.env.AI_READY_SECRET
  }
})
```

## [`runtimeSync`](#runtimesync)

- **Type:** `boolean| { ttl?: number, batchSize?: number, pruneTtl?: number }`
- **Default:** `false`

**Opt-in runtime sync for dynamic content sites.** Most sites don't need this - prerendering handles page indexing automatically.

Enable only if your site has frequently changing content that can't be prerendered. Set to `true` for defaults or object to customize.

| Option | Type | Default | Description |
| --- | --- | --- | --- |
| `ttl` | `number` | `3600` | Re-index pages & refresh sitemap older than this (seconds) |
| `batchSize` | `number` | `20` | Pages per batch (max: 50) |
| `pruneTtl` | `number` | `0` | Prune routes not in sitemap for this long (0 = never) |

```
export default defineNuxtConfig({
  aiReady: {
    runtimeSync: {
      ttl: 3600,
      batchSize: 20,
      pruneTtl: 604800 // prune after 7 days
    },
    runtimeSyncSecret: process.env.AI_READY_SECRET,
    cron: true // enable scheduled indexing
  }
})
```

**When enabled:**

- `GET /__ai-ready/status` - Check indexing progress
- `POST /__ai-ready/poll` - Trigger batch indexing (requires `Authorization: Bearer<token>` header)
- `POST /__ai-ready/prune` - Prune stale routes (requires `Authorization: Bearer<token>` header)

See

 for details.

[Edit this page](https://github.com/nuxt-seo-pro/nuxt-ai-ready/edit/main/docs/content/3.api/5.config.md)

[Markdown For LLMs](https://nuxtseo.com/docs/ai-ready/api/config.md)

Did this page help you?

### Related

On this page

- [enabled](#enabled)
- [debug](#debug)
- [mdreamOptions](#mdreamoptions)
- [markdownCacheHeaders](#markdowncacheheaders)
- [llmsTxt](#llmstxt)
- [contentSignal](#contentsignal)
- [mcp](#mcp)
- [llmsTxtCacheSeconds](#llmstxtcacheseconds)
- [database](#database)
- [cron](#cron)
- [indexNow](#indexnow)
- [runtimeSyncSecret](#runtimesyncsecret)
- [runtimeSync](#runtimesync)

[GitHub](https://github.com/harlan-zw/nuxt-seo) [ Discord](https://discord.com/invite/275MBUBvgP)

###

-
-

Modules

-
-
-
-
-
-
-
-
-

###

-
-
-

###

Nuxt

-
-
-
-
-

Vue

-
-
-
-
-
-
-
-

###

-
-
-
-
-
-
-
-
-
-

Copyright © 2023-2026 Harlan Wilton - [MIT License](https://github.com/harlan-zw/nuxt-seo/blob/main/license) · [mdream](https://mdream.dev)