export default defineNuxtConfig({
aiReady: {
// options
}
})
enabledbooleantrueaiReady: {
enabled: process.env.NODE_ENV === 'production'
}
debugbooleanfalseEnable debug logging for module operations.
mdreamOptionsHTMLToMarkdownOptions & { preset?: 'minimal' }{ preset: 'minimal' }Configure mdream HTML-to-markdown conversion.
export default defineNuxtConfig({
aiReady: {
mdreamOptions: {
preset: 'minimal'
}
}
})
markdownCacheHeaders{ maxAge?: number, swr?: boolean }{ 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 |
llmsTxtLlmsTxtConfigConfigure llms.txt generation.
export default defineNuxtConfig({
aiReady: {
llmsTxt: {
sections: [
{
title: 'API Reference',
links: [
{ title: 'REST API', href: '/docs/api', description: 'API docs' }
]
}
],
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 |
LlmsTxtConfig:
| Property | Type | Description |
|---|---|---|
sections | LlmsTxtSection[] | Custom sections |
notes | string | string[] | Notes at end |
contentSignalfalse | { aiTrain?: boolean, search?: boolean, aiInput?: boolean }falseContent Signal directives for robots.txt. See Content Signals guide.
export default defineNuxtConfig({
aiReady: {
contentSignal: {
aiTrain: false, // Block training
search: true, // Allow search indexing
aiInput: true, // Allow RAG/grounding
}
}
})
mcp{ tools?: boolean, resources?: boolean }{ 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 MCP guide for tool/resource details.
cacheMaxAgeSecondsnumber600 (10 minutes)Cache duration for llms.txt route handlers. Uses stale-while-revalidate.
export default defineNuxtConfig({
aiReady: {
cacheMaxAgeSeconds: 3600 // 1 hour
}
})
database{ type?: string, filename?: string, bindingName?: string, url?: string, authToken?: string }{ type: 'sqlite', filename: '.data/ai-ready/pages.db' }Configure the SQLite 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 |
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 | bun:sqlite |
| Node.js 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 tableai_ready_pages_fts - FTS5 full-text search index_ai_ready_info - Schema version trackingThis allows safe use with existing D1/LibSQL databases without risk of overwriting user tables.
runtimeSync{ enabled?: boolean, ttl?: number, batchSize?: number, cron?: string, secret?: string, pruneTtl?: number }{ enabled: 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.
| Option | Type | Default | Description |
|---|---|---|---|
enabled | boolean | false | Enable runtime sync |
ttl | number | 3600 | Re-index pages & refresh sitemap older than this (seconds) |
batchSize | number | 20 | Pages per batch (max: 50) |
cron | string | — | Cron expression for scheduled indexing |
secret | string | — | Auth token for /__ai-ready/poll endpoint |
pruneTtl | number | 0 | Prune routes not in sitemap for this long (0 = never) |
export default defineNuxtConfig({
aiReady: {
runtimeSync: {
enabled: true,
ttl: 3600,
batchSize: 20,
secret: process.env.AI_READY_SECRET,
pruneTtl: 604800, // prune after 7 days
cron: '*/5 * * * *' // enable scheduled indexing
}
}
})
When enabled:
GET /__ai-ready/status - Check indexing progressPOST /__ai-ready/poll?secret=<token> - Trigger batch indexingPOST /__ai-ready/prune?secret=<token> - Prune stale routesSee Runtime Sync guide for details.
indexNow{ enabled?: boolean, key?: string, host?: string }NUXT_AI_READY_INDEXNOW_KEY env var is setInstantly notify search engines (Bing, Yandex, Naver, Seznam) when pages change.
| Option | Type | Default | Description |
|---|---|---|---|
enabled | boolean | true (when key exists) | Enable IndexNow |
key | string | process.env.NUXT_AI_READY_INDEXNOW_KEY | Your IndexNow API key |
host | string | 'api.indexnow.org' | IndexNow endpoint |
Minimal setup (just set env var):
NUXT_AI_READY_INDEXNOW_KEY=your-api-key-here
Explicit configuration:
export default defineNuxtConfig({
aiReady: {
indexNow: {
enabled: true,
key: process.env.INDEXNOW_KEY,
host: 'api.indexnow.org'
}
}
})
When enabled:
/{key}.txtruntimeSync.cron set)POST /__ai-ready/indexnow/__ai-ready/statusSee IndexNow guide for details.