Nuxt API

Configuration

Last updated by Harlan Wilton in doc: sync.

Configuration options for nuxt.config.ts.

Basic Configuration

nuxt.config.ts
export default defineNuxtConfig({
  aiReady: {
    // Your configuration here
  }
})

Options

enabled: boolean

  • Default: true

Enable the module.

export default defineNuxtConfig({
  aiReady: {
    enabled: process.env.NODE_ENV === 'production'
  }
})

debug: boolean

  • Default: false

Enable debug logging for module operations.

export default defineNuxtConfig({
  aiReady: {
    debug: true
  }
})

mdreamOptions: HTMLToMarkdownOptions

  • Default: { preset: 'minimal' }

Configure mdream HTML-to-markdown conversion.

export default defineNuxtConfig({
  aiReady: {
    mdreamOptions: {
      preset: 'minimal',
      // Additional mdream options
    }
  }
})

Available preset:

  • 'minimal' - Minimal markdown output for AI consumption

See mdream documentation for all options.

markdownCacheHeaders: object

  • Default: { maxAge: 3600, swr: true }

Cache settings for markdown endpoints.

export default defineNuxtConfig({
  aiReady: {
    markdownCacheHeaders: {
      maxAge: 7200, // Cache for 2 hours
      swr: true // Enable stale-while-revalidate
    }
  }
})

Options:

  • maxAge - Cache duration in seconds (default: 3600 = 1 hour)
  • swr - Enable stale-while-revalidate (default: true)

llmsTxt: LlmsTxtConfig

  • Default: Auto-generated with API endpoints

Configure llms.txt generation.

export default defineNuxtConfig({
  aiReady: {
    llmsTxt: {
      sections: [
        {
          title: 'Getting Started',
          description: 'Learn how to use our API',
          links: [
            {
              title: 'API Documentation',
              href: '/docs/api',
              description: 'Complete API reference'
            }
          ]
        }
      ],
      notes: 'Built with Nuxt AI Ready'
    }
  }
})

LlmsTxtSection interface:

  • title - Section title
  • description - Section description (string or string for multiple paragraphs)
  • links - Links with title, href, and optional description

LlmsTxtConfig interface:

  • sections - Array of sections
  • notes - Notes section (appears at end, string or string)

API endpoint sections for enabled features (bulk JSONL, MCP server) are added automatically.

mcp: object

  • Default: { tools: true, resources: true }

Control which MCP (Model Context Protocol) tools and resources are exposed when @nuxtjs/mcp-toolkit is installed.

export default defineNuxtConfig({
  aiReady: {
    mcp: {
      tools: true, // Enable list_pages tool
      resources: true, // Enable pages and pages-chunks resources
    },
  }
})

Tools:

  • list_pages - List all pages with metadata (minimal mode) or content chunks (chunks mode)

Resources:

  • pages - Page-level metadata in TOON format (resource://nuxt-ai-ready/pages)
  • pages-chunks - Chunk-level content in TOON format (resource://nuxt-ai-ready/pages-chunks, production only)

See MCP Integration guide for detailed documentation.

contentSignal: object | false

  • Default: false

Content Signal directives for controlling AI usage of site content. Adds standardized metadata to robots.txt.

export default defineNuxtConfig({
  aiReady: {
    contentSignal: {
      aiTrain: false, // Disallow training/fine-tuning AI models
      search: true, // Allow building search index
      aiInput: true, // Allow RAG/grounding for AI answers
    },
  }
})

Options:

  • aiTrain - Allow training or fine-tuning AI models on content
  • search - Allow building search index and returning excerpts (excludes AI summaries)
  • aiInput - Allow inputting content into AI models for RAG, grounding, or generative search

Set to false to disable content signal directives entirely.

See Content Signals guide for more details.

timestamps: object

  • Default: { enabled: false, manifestPath: 'node_modules/.cache/nuxt-seo/ai-index/content-hashes.json' }

Track page content freshness via content hashing. Generates updatedAt timestamps in TOON exports and integrates with Nuxt Sitemap to set lastmod values.

export default defineNuxtConfig({
  aiReady: {
    timestamps: {
      enabled: true,
      manifestPath: 'node_modules/.cache/nuxt-seo/ai-index/content-hashes.json'
    }
  }
})

Options:

  • enabled - Enable timestamp tracking (default: false)
  • manifestPath - Path to store content hash manifest, relative to project root (default: node_modules/.cache/nuxt-seo/ai-index/content-hashes.json)

See Automatic Updated At guide for detailed documentation.

Did this page help you?