---
title: "Nuxt Hooks · Nuxt AI Ready · Nuxt SEO"
canonical_url: "https://nuxtseo.com/docs/ai-ready/api/nuxt-hooks"
last_updated: "2026-08-16T09:50:27.269Z"
meta:
  description: "Nuxt hooks provided by nuxt-ai-ready for extending functionality."
  "og:description": "Nuxt hooks provided by nuxt-ai-ready for extending functionality."
  "og:title": "Nuxt Hooks · Nuxt AI Ready · Nuxt SEO"
---

Nuxt SEO on GitHub

Switch to AI ReadySwitch to Nuxt SEOSwitch to RobotsSwitch to SitemapSwitch to OG ImageSwitch to Schema.orgSwitch to Link CheckerSwitch to SEO UtilsSwitch to Site ConfigSwitch to Skew Protection

**Nuxt API**

# **Nuxt Hooks**

## `**'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 `**page-data.jsonl**`.

nuxt.config.ts

```ts
export default defineNuxtConfig({
  hooks: {
    'ai-ready:page:markdown': (ctx) => {
      // Add frontmatter
      ctx.markdown = `---\ntitle: ${ctx.title}\n---\n\n${ctx.markdown}`
    }
  }
})
```

**Context:**

| **Property** | **Type** | **Description** |
| --- | --- | --- |
| `**route**` | `**string**` | Page route (e.g., `**/about**`) |
| `**markdown**` | `**string**` | Generated markdown (modify this) |
| `**title**` | `**string**` | Page title |
| `**description**` | `**string**` | Page description |
| `**headings**` | `**Array<Record<string, string>>**` | Extracted headings from page |
| `**updatedAt**` | `**string?**` | Last modified date (from sitemap) |

Only fires during `**nuxi generate**` or `**nuxi build --prerender**`.

## `**'ai-ready:llms-txt'**`

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

Called before llms.txt generation. Add or modify sections and notes.

nuxt.config.ts

```ts
export default defineNuxtConfig({
  hooks: {
    'ai-ready:llms-txt': (payload) => {
      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:**

| **Property** | **Type** | **Description** |
| --- | --- | --- |
| `**sections**` | `**LlmsTxtSection[]**` | Sections with title, description, links |
| `**notes**` | `**string[]**` | Heading-free context rendered before file-list sections |

Mutable pattern - modify arrays directly, don't return values.

**Was this page helpful?**

### **Related **

[**llms.txt Generation**](https://nuxtseo.com/docs/ai-ready/guides/llms-txt)

[**Nitro Hooks**](https://nuxtseo.com/docs/ai-ready/nitro-api/nitro-hooks)

[**RAG Setup** Vectorize your site's markdown for semantic search and RAG pipelines.](https://nuxtseo.com/docs/ai-ready/advanced/rag-example) [**Configuration** Nuxt configuration reference for Nuxt AI Ready.](https://nuxtseo.com/docs/ai-ready/api/config)