Api

Configuration

Last updated by
Harlan Wilton
in initial commit.

Complete configuration options for nuxt.config.ts.

Basic Configuration

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

Options

enabled: boolean

  • Default: true

Enable or disable 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
  }
})

bulkRoute: string | false

  • Default: '/content.jsonl'

Route path for the bulk JSONL API endpoint. Set to false to disable bulk export.

export default defineNuxtConfig({
  aiReady: {
    bulkRoute: '/_ai-ready/bulk' // Custom path
  }
})

The bulk endpoint returns newline-delimited JSON (JSONL) containing all indexed content chunks.

mdreamOptions: HTMLToMarkdownOptions

  • Default: { preset: 'minimal' }

Options to pass to the mdream HTML-to-markdown conversion library.

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

Available preset:

  • 'minimal' - Minimal markdown output optimized for AI consumption

For complete mdream options, see the mdream documentation.

markdownCacheHeaders: object

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

Cache configuration 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

Structured configuration for 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 - Array of links with title, href, and optional description

LlmsTxtConfig interface:

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

The module automatically adds API endpoint sections for enabled features (bulk JSONL, MCP server).

Did this page help you?