Index of every page on this site: llms.txt

Use these hooks in nuxt.config.ts to change build-time output. Mutate the supplied payload; return values are ignored.

'ai-ready:page:markdown'

Type: (ctx: ParsedMarkdownResult & { route: string }) => void | Promise<void>

Called per page during prerender. Modify markdown content before it's written to llms-full.txt and stored page data.

nuxt.config.ts
export default defineNuxtConfig({
  hooks: {
    'ai-ready:page:markdown': (ctx) => {
      ctx.markdown += '\n\nSee /support for help.'
    }
  }
})

Context:

PropertyTypeDescription
routestringPage route (e.g., /about)
markdownstringGenerated markdown (modify this)
titlestringPage title
descriptionstringPage description
headingsArray<Record<string, string>>Extracted headings from page
updatedAtstring?Date extracted from page metadata, when available

Runs during prerendering, including nuxi generate and nuxi build --prerender.

'ai-ready:llms-txt'

Type: (payload: { sections: LlmsTxtSection[] | undefined, notes: string[] }) => void | Promise<void>

Runs during module setup, before llms.txt configuration is finalized. Add sections or notes to the supplied payload.

nuxt.config.ts
export default defineNuxtConfig({
  hooks: {
    'ai-ready:llms-txt': (payload) => {
      payload.sections ??= []
      payload.sections.push({
        title: 'Custom APIs',
        description: 'Additional endpoints',
        links: [
          { title: 'Search', href: '/api/search', description: 'Search endpoint' }
        ]
      })
      payload.notes.push('Built with Nuxt AI Ready')
    }
  }
})

Payload:

PropertyTypeDescription
sectionsLlmsTxtSection[] | undefinedSections with title, description, links
notesstring[]Heading-free context rendered before file-list sections

Change the arrays directly. This hook does not run for each HTTP request.

'ai-ready:agent-skills'

Type: (payload: { skills: AgentSkillConfig[] }) => void | Promise<void>

Runs after the module combines local and configured skills, before it resolves the root alias and publication routes. Mutate payload.skills to add or remove entries. See Agent Skills Discovery for entry shapes.

Was this page helpful?