nuxt-ai-ready 3.5.0 → 3.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/agent-skills.mjs +5 -3
- package/dist/chunks/prerender.mjs +48 -24
- package/dist/cli.mjs +5 -5
- package/dist/module.d.mts +4 -0
- package/dist/module.json +2 -2
- package/dist/module.mjs +5 -3
- package/dist/runtime/ai-terms.d.ts +76 -0
- package/dist/runtime/ai-terms.js +1 -0
- package/dist/runtime/app/plugins/md-alternate.server.js +11 -3
- package/dist/runtime/llms-txt-utils.js +7 -9
- package/dist/runtime/server/db/schema/postgres.d.ts +8 -0
- package/dist/runtime/server/db/schema/sqlite.d.ts +8 -0
- package/dist/runtime/server/middleware/markdown.js +13 -175
- package/dist/runtime/server/middleware/render-markdown.d.ts +2 -0
- package/dist/runtime/server/middleware/render-markdown.js +163 -0
- package/dist/runtime/server/plugins/ai-terms.d.ts +2 -0
- package/dist/runtime/server/plugins/ai-terms.js +11 -0
- package/dist/runtime/server/plugins/markdown-negotiation.js +11 -1
- package/dist/runtime/server/routes/ai-terms.d.ts +2 -0
- package/dist/runtime/server/routes/ai-terms.js +22 -0
- package/dist/runtime/server/routes/api-catalog.js +6 -2
- package/dist/runtime/server/routes/llms.txt.get.js +3 -0
- package/dist/runtime/server/utils/auth.d.ts +1 -3
- package/dist/runtime/server/utils/auth.js +55 -25
- package/dist/runtime/server/utils/cloudflare-prerendered.d.ts +1 -1
- package/dist/runtime/server/utils/cloudflare-prerendered.js +17 -15
- package/dist/runtime/server/utils/link-header.d.ts +4 -0
- package/dist/runtime/server/utils/link-header.js +6 -2
- package/dist/runtime/server/utils/negotiation-decision.d.ts +4 -0
- package/dist/runtime/server/utils/negotiation-decision.js +8 -1
- package/dist/runtime/server/utils/negotiation-response.d.ts +3 -1
- package/dist/runtime/server/utils/negotiation-response.js +31 -9
- package/dist/runtime/sync-secret.d.ts +1 -0
- package/dist/runtime/sync-secret.js +2 -1
- package/dist/runtime/types.d.ts +12 -0
- package/dist/shared/{nuxt-ai-ready.BaNK8yfw.mjs → nuxt-ai-ready.Bzx0dNWj.mjs} +324 -36
- package/dist/shared/{nuxt-ai-ready.B3hAuOLQ.mjs → nuxt-ai-ready.DCd-1s1G.mjs} +1 -1
- package/dist/types.d.mts +2 -0
- package/package.json +36 -36
- package/skills/nuxt-ai-ready/SKILL.md +52 -96
- package/dist/cli.d.mts +0 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nuxt-ai-ready",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.6.0",
|
|
5
5
|
"description": "Best practice AI & LLM discoverability for Nuxt sites.",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Harlan Wilton",
|
|
@@ -71,61 +71,61 @@
|
|
|
71
71
|
}
|
|
72
72
|
},
|
|
73
73
|
"dependencies": {
|
|
74
|
-
"@mdream/js": "^2.0
|
|
75
|
-
"@nuxt/kit": "^4.6.
|
|
76
|
-
"@nuxtjs/robots": "^7.
|
|
77
|
-
"@nuxtjs/sitemap": "^9.
|
|
74
|
+
"@mdream/js": "^2.1.0",
|
|
75
|
+
"@nuxt/kit": "^4.6.4",
|
|
76
|
+
"@nuxtjs/robots": "^7.1.0",
|
|
77
|
+
"@nuxtjs/sitemap": "^9.2.0",
|
|
78
78
|
"citty": "^0.2.2",
|
|
79
|
-
"confbox": "^0.3.
|
|
79
|
+
"confbox": "^0.3.2",
|
|
80
80
|
"consola": "^3.4.2",
|
|
81
81
|
"defu": "^6.1.7",
|
|
82
|
-
"mdream": "^2.0
|
|
83
|
-
"nuxt-site-config": "^5.0.
|
|
84
|
-
"nuxtseo-shared": "^6.0.
|
|
82
|
+
"mdream": "^2.1.0",
|
|
83
|
+
"nuxt-site-config": "^5.0.4",
|
|
84
|
+
"nuxtseo-shared": "^6.0.4",
|
|
85
85
|
"ohash": "^2.0.12",
|
|
86
86
|
"pathe": "^2.0.3",
|
|
87
|
-
"site-config-stack": "^5.0.
|
|
88
|
-
"sitemapd": "^0.2.
|
|
87
|
+
"site-config-stack": "^5.0.4",
|
|
88
|
+
"sitemapd": "^0.2.3",
|
|
89
89
|
"ufo": "^1.6.4",
|
|
90
90
|
"yaml": "^2.9.1"
|
|
91
91
|
},
|
|
92
92
|
"devDependencies": {
|
|
93
93
|
"@antfu/eslint-config": "^9.5.1",
|
|
94
94
|
"@arethetypeswrong/cli": "^0.18.5",
|
|
95
|
-
"@harlan-zw/comark-content": "^0.2.
|
|
95
|
+
"@harlan-zw/comark-content": "^0.2.2",
|
|
96
96
|
"@libsql/client": "^0.18.0",
|
|
97
|
-
"@nuxt/content": "^3.16.
|
|
98
|
-
"@nuxt/module-builder": "^1.0.
|
|
99
|
-
"@nuxt/test-utils": "^4.
|
|
97
|
+
"@nuxt/content": "^3.16.2",
|
|
98
|
+
"@nuxt/module-builder": "^1.0.4",
|
|
99
|
+
"@nuxt/test-utils": "^4.4.0",
|
|
100
100
|
"@nuxtjs/eslint-config-typescript": "^12.1.0",
|
|
101
|
-
"@nuxtjs/mcp-toolkit": "^0.
|
|
101
|
+
"@nuxtjs/mcp-toolkit": "^0.24.3",
|
|
102
102
|
"@types/better-sqlite3": "^9.6.0",
|
|
103
|
-
"@vitest/coverage-v8": "^5.0
|
|
104
|
-
"@vue/test-utils": "^2.
|
|
103
|
+
"@vitest/coverage-v8": "^5.1.0",
|
|
104
|
+
"@vue/test-utils": "^2.6.0",
|
|
105
105
|
"@vueuse/nuxt": "^15.0.0",
|
|
106
|
-
"better-sqlite3": "^13.0
|
|
106
|
+
"better-sqlite3": "^13.2.0",
|
|
107
107
|
"bumpp": "^12.3.0",
|
|
108
|
-
"drizzle-orm": "1.0.0-rc.
|
|
109
|
-
"eslint": "^10.
|
|
108
|
+
"drizzle-orm": "1.0.0-rc.5",
|
|
109
|
+
"eslint": "^10.15.0",
|
|
110
110
|
"eslint-plugin-harlanzw": "^0.23.0",
|
|
111
|
-
"execa": "^10.
|
|
112
|
-
"h3": "^2.0.
|
|
113
|
-
"happy-dom": "^
|
|
114
|
-
"nitropack": "^2.13.
|
|
115
|
-
"nuxt": "4.6.
|
|
116
|
-
"nuxt-site-config": "^5.0.
|
|
117
|
-
"nuxtseo-layer-devtools": "^
|
|
118
|
-
"playwright": "^1.
|
|
119
|
-
"playwright-core": "^1.
|
|
111
|
+
"execa": "^10.2.1",
|
|
112
|
+
"h3": "^2.0.8",
|
|
113
|
+
"happy-dom": "^21.0.4",
|
|
114
|
+
"nitropack": "^2.13.6",
|
|
115
|
+
"nuxt": "4.6.4",
|
|
116
|
+
"nuxt-site-config": "^5.0.4",
|
|
117
|
+
"nuxtseo-layer-devtools": "^6.0.2",
|
|
118
|
+
"playwright": "^1.65.1",
|
|
119
|
+
"playwright-core": "^1.65.1",
|
|
120
120
|
"postgres": "^3.4.9",
|
|
121
121
|
"typescript": "6.0.3",
|
|
122
122
|
"unbuild": "^3.6.1",
|
|
123
|
-
"vitest": "^5.0
|
|
124
|
-
"vue": "^3.5.
|
|
125
|
-
"vue-router": "^5.
|
|
126
|
-
"vue-tsc": "^3.3.
|
|
127
|
-
"wrangler": "^4.
|
|
128
|
-
"zod": "^4.6.
|
|
123
|
+
"vitest": "^5.1.0",
|
|
124
|
+
"vue": "^3.5.45",
|
|
125
|
+
"vue-router": "^5.5.1",
|
|
126
|
+
"vue-tsc": "^3.3.14",
|
|
127
|
+
"wrangler": "^4.163.0",
|
|
128
|
+
"zod": "^4.6.7"
|
|
129
129
|
},
|
|
130
130
|
"build": {
|
|
131
131
|
"externals": [
|
|
@@ -8,91 +8,53 @@ compatibility: "Requires Node.js ^22.22.3 || ^24.15.0 || >=26.0.0. Requires Nuxt
|
|
|
8
8
|
# nuxt-ai-ready
|
|
9
9
|
|
|
10
10
|
Covers `nuxt-ai-ready` v3 on Nuxt 4.6 or Nuxt 5.
|
|
11
|
-
The module converts rendered pages to Markdown with mdream and publishes `llms.txt`, `llms-full.txt`, and `.md`
|
|
12
|
-
Optional parts add MCP tools, WebMCP tools, and a runtime page index. Config key: `aiReady`. Docs: https://nuxtseo.com/ai-ready
|
|
11
|
+
The module converts rendered pages to Markdown with mdream and publishes `llms.txt`, `llms-full.txt`, and a `.md` twin per page. Config key: `aiReady`. Docs: https://nuxtseo.com/ai-ready
|
|
13
12
|
|
|
14
13
|
## Setup
|
|
15
14
|
|
|
16
|
-
Included in `@nuxtjs/seo` v6. If the app uses `@nuxtjs/seo`, configure the `aiReady` key and do not add the module again.
|
|
17
|
-
Nuxt SEO uses AI Ready's own defaults. It overrides no `aiReady` option.
|
|
18
|
-
With these defaults the database stays off, so the app does not need `drizzle-orm`.
|
|
19
|
-
|
|
20
|
-
The package installs `@nuxtjs/robots` and `@nuxtjs/sitemap` and loads them as module dependencies. Configure them with the `robots` and `sitemap` keys.
|
|
21
|
-
|
|
22
15
|
```bash
|
|
23
16
|
npx nuxt module add nuxt-ai-ready
|
|
24
17
|
```
|
|
25
18
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
19
|
+
Included in `@nuxtjs/seo` v6: configure `aiReady`, do not add the module again. Nuxt SEO keeps AI Ready's defaults: database off, no `drizzle-orm` needed.
|
|
20
|
+
The package loads `@nuxtjs/robots` and `@nuxtjs/sitemap`; configure them with the `robots` and `sitemap` keys.
|
|
21
|
+
Set `site.url`: canonical URLs, `Link` headers, and `/.well-known/ai-catalog.json` use it.
|
|
22
|
+
Prerender the pages you want in `llms-full.txt` and the page index (`nuxt generate`, or `nitro.prerender.routes`). A page visit indexes nothing.
|
|
29
23
|
|
|
30
24
|
## Automatic behaviour
|
|
31
25
|
|
|
32
|
-
With no `aiReady` config
|
|
26
|
+
With no `aiReady` config:
|
|
33
27
|
|
|
34
|
-
- `/llms.txt`: site
|
|
35
|
-
- `/llms-full.txt`:
|
|
36
|
-
- A `.md` twin per page
|
|
37
|
-
- Accept negotiation: a request that prefers `text/markdown` gets a `307` to the `.md` URL
|
|
38
|
-
- `<link rel="alternate" type="text/markdown">` and
|
|
39
|
-
- `/sitemap.md
|
|
40
|
-
- Nuxt Content v3 `page` collections: the `.md` route serves
|
|
41
|
-
- Agent skills
|
|
42
|
-
- `Content-Signal: search=yes, ai-input=yes` in `robots.txt
|
|
43
|
-
|
|
44
|
-
Off by default: MCP, WebMCP, runtime sync, cron, and the database.
|
|
28
|
+
- `/llms.txt`: site summary and sitemap pages. Large lists split under `/llms/`.
|
|
29
|
+
- `/llms-full.txt`: full Markdown of each prerendered page.
|
|
30
|
+
- A `.md` twin per page: `/about` becomes `/about.md`. Paths under `/api` and `/_` get none.
|
|
31
|
+
- Accept negotiation: a request that prefers `text/markdown` gets a `307` to the `.md` URL and `Vary: Accept`. `botNegotiation: true` extends this to AI bot user agents.
|
|
32
|
+
- `<link rel="alternate" type="text/markdown">` and `describedby` links, plus matching `Link` headers.
|
|
33
|
+
- `/sitemap.md` and a `## Sitemap` footer on generated `.md` pages; `sitemapMd: false` removes both.
|
|
34
|
+
- Nuxt Content v3 `page` collections: the `.md` route serves source Markdown; `contentSource: false` converts HTML.
|
|
35
|
+
- Agent skills in `public/skills/<name>/SKILL.md` publish at `/.well-known/agent-skills/` and in `llms.txt`; `agentSkills: false` disables.
|
|
36
|
+
- `Content-Signal: search=yes, ai-input=yes` in `robots.txt`; `contentSignal: false` removes it.
|
|
37
|
+
- Off by default: MCP, WebMCP, runtime sync, cron, and the database.
|
|
45
38
|
|
|
46
39
|
## Common tasks
|
|
47
40
|
|
|
48
|
-
Add llms.txt sections
|
|
41
|
+
Add llms.txt sections and notes; `notes` renders before the first heading:
|
|
49
42
|
|
|
50
43
|
```ts
|
|
51
44
|
export default defineNuxtConfig({
|
|
52
45
|
aiReady: {
|
|
53
46
|
llmsTxt: {
|
|
54
|
-
sections: [{ title: '
|
|
47
|
+
sections: [{ title: 'Skills', sitemap: 'skills', path: '/llms/skills.txt' }],
|
|
55
48
|
notes: 'Built with Nuxt AI Ready',
|
|
56
49
|
},
|
|
57
50
|
},
|
|
58
51
|
})
|
|
59
52
|
```
|
|
60
53
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
```ts
|
|
64
|
-
export default defineNuxtConfig({
|
|
65
|
-
aiReady: {
|
|
66
|
-
llmsFullTxt: false,
|
|
67
|
-
llmsTxt: {
|
|
68
|
-
markdownLinks: true,
|
|
69
|
-
sitemaps: ['pages', 'skills', 'demos'],
|
|
70
|
-
sections: [
|
|
71
|
-
{ title: 'Skills', sitemap: 'skills', path: '/llms/skills.txt' },
|
|
72
|
-
{ title: 'Demos', sitemap: 'demos', path: '/llms/demos.txt' },
|
|
73
|
-
],
|
|
74
|
-
},
|
|
75
|
-
},
|
|
76
|
-
})
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
The root links each section file. Chunked sitemaps keep their configured name.
|
|
80
|
-
Every file stays within `maxLength`, default 80,000 characters. Static builds emit every linked child.
|
|
81
|
-
GET and HEAD work on every generated discovery file. Empty sections produce no link or file.
|
|
54
|
+
Every generated file stays within `llmsTxt.maxLength` (default 80,000); empty sections produce no link or file.
|
|
55
|
+
For application-owned discovery, place `public/llms.txt` (preserved as is) or set `llmsTxt: false`.
|
|
82
56
|
|
|
83
|
-
|
|
84
|
-
If a server handler owns discovery, set `llmsTxt: false`.
|
|
85
|
-
Use `llmsFullTxt: false` instead of redirecting the full export to the index.
|
|
86
|
-
|
|
87
|
-
Remove an element from the Markdown on every path, build and runtime. Put it in `mdreamOptions`; the defaults `minimal` and `clean` stay on:
|
|
88
|
-
|
|
89
|
-
```ts
|
|
90
|
-
export default defineNuxtConfig({
|
|
91
|
-
aiReady: { mdreamOptions: { filter: { exclude: ['.author-bio'] } } },
|
|
92
|
-
})
|
|
93
|
-
```
|
|
94
|
-
|
|
95
|
-
Change the Markdown text. The Nitro hook covers runtime `.md` responses, prerendered `.md` files, `llms-full.txt`, and indexed pages. `ctx.isPrerender` is `true` only during prerendering:
|
|
57
|
+
Rewrite the Markdown of every response with the Nitro hook (runtime `.md`, prerendered `.md`, `llms-full.txt`, indexed pages):
|
|
96
58
|
|
|
97
59
|
```ts
|
|
98
60
|
// server/plugins/markdown.ts
|
|
@@ -103,71 +65,65 @@ export default defineNitroPlugin((nitroApp) => {
|
|
|
103
65
|
})
|
|
104
66
|
```
|
|
105
67
|
|
|
106
|
-
|
|
68
|
+
Drop an element from every conversion with `mdreamOptions`, e.g. `aiReady: { mdreamOptions: { filter: { exclude: ['.author-bio'] } } }`; the `minimal` and `clean` defaults stay on.
|
|
69
|
+
|
|
70
|
+
Content Signals: a `contentSignal` object states the whole policy, so an omitted permission renders as `no`:
|
|
107
71
|
|
|
108
72
|
```ts
|
|
109
73
|
export default defineNuxtConfig({ aiReady: { contentSignal: { search: true, aiInput: true, aiTrain: false } } })
|
|
110
74
|
// robots.txt: Content-Signal: ai-train=no, search=yes, ai-input=yes
|
|
111
75
|
```
|
|
112
76
|
|
|
113
|
-
MCP: install `@nuxtjs/mcp-toolkit
|
|
114
|
-
|
|
115
|
-
WebMCP: set `webmcp: true`. This registers the same three tools in the browser and auto-imports `useWebMcpTool()` and `useWebMcpSupported()`. The tools need the database and `drizzle-orm`. Without `webmcp`, those composables are not defined.
|
|
77
|
+
MCP: install `@nuxtjs/mcp-toolkit`, add it to `modules`; it registers `list_pages`, `search_pages`, and `get_page_markdown` at `/mcp`. WebMCP: set `webmcp: true` for the same tools in the browser plus the `useWebMcpTool()` composable. Both need the database, so run `npx nypm add drizzle-orm@1.0.0-rc.4`. `nuxt generate` output cannot host MCP.
|
|
116
78
|
|
|
117
|
-
Runtime indexing, database drivers, Cloudflare D1, and the
|
|
79
|
+
Runtime indexing, database drivers, Cloudflare D1, and the query helpers: see [references/runtime-indexing.md](references/runtime-indexing.md).
|
|
118
80
|
|
|
119
81
|
## Traps
|
|
120
82
|
|
|
121
83
|
- **Discovery is not authorization.** Selected sitemaps exclude stale rows from `llms.txt`; they do not delete stored content or protect other APIs.
|
|
122
84
|
- **Custom route policies must allow Markdown twins.** If middleware rejects `/skills/planning.md`, allow it whenever `/skills/planning` is allowed.
|
|
123
|
-
- **The same
|
|
124
|
-
- **Content source pages skip conversion hooks
|
|
85
|
+
- **The same hook name exists twice.** `ai-ready:page:markdown` is a Nuxt hook (prerender only) and a Nitro hook (every conversion) with different context; an edit in both applies twice. The Nitro `ctx.event` is undefined outside a request.
|
|
86
|
+
- **Content source pages skip conversion hooks** and ignore `mdreamOptions`.
|
|
125
87
|
- **Dev has no page data.** Query helpers, MCP tools, and search return empty results in `nuxt dev`. Test with `nuxt build` and `node .output/server/index.mjs`.
|
|
126
|
-
- **Cloudflare static pages negotiate only with `contentNegotiation: true`.**
|
|
127
|
-
- **Response caching turns negotiation off.** An ISR, `swr`, or `cache` route rule without `varies: ['accept']` serves HTML to Markdown clients
|
|
128
|
-
- **Emptying `ctx.markdown` does not hide a page.** It drops the body from `llms-full.txt
|
|
129
|
-
- **Root `skills/` folders
|
|
130
|
-
-
|
|
131
|
-
- **`database: false` conflicts with `runtimeSync` and `cron`.** The build fails and names the option.
|
|
132
|
-
- **A database feature without `drizzle-orm` 1.x fails the build.** `runtimeSync`, `cron`, MCP site tools, WebMCP site tools, and an explicit `database` option turn on the database. A `drizzle-orm` 0.x install fails too. The error names the feature and the install command. If MCP Toolkit serves only your own tools, set `database: false` instead.
|
|
88
|
+
- **Cloudflare static pages negotiate only with `contentNegotiation: true`.** It moves prerendered pages into `assets.run_worker_first`: exact paths up to Cloudflare's 100 entries, then globs such as `/docs/*`. Over 100 top-level pages fail the build.
|
|
89
|
+
- **Response caching turns negotiation off.** An ISR, `swr`, or `cache` route rule without `varies: ['accept']` serves HTML to Markdown clients; with `botNegotiation: true` the rule needs `varies: ['accept', 'sec-fetch-dest', 'user-agent']`. The `.md` URL still works.
|
|
90
|
+
- **Emptying `ctx.markdown` does not hide a page.** It drops the body from `llms-full.txt`; the URL stays in `llms.txt` and the index. Use `sitemap.exclude` and access control.
|
|
91
|
+
- **Root `skills/` folders stay private.** Discovery scans public directories only; `agentSkills.dir: 'skills'` publishes them.
|
|
92
|
+
- **`database: false` conflicts with `runtimeSync` and `cron`;** the build fails and names the option. A database feature without `drizzle-orm` 1.x fails too. If MCP Toolkit serves only your own tools, set `database: false`.
|
|
133
93
|
|
|
134
94
|
## Version limits
|
|
135
95
|
|
|
136
|
-
- v3 requires Nuxt `^4.6.0 || ^5.0.0
|
|
137
|
-
- v3 does not install `drizzle-orm`.
|
|
138
|
-
- v3
|
|
139
|
-
- v3
|
|
140
|
-
-
|
|
141
|
-
-
|
|
142
|
-
- v3 adds typed entries. Import server functions from `#ai-ready/server` and app functions from `#ai-ready/app`.
|
|
143
|
-
- v2 removed IndexNow. The `indexNow` option and `/__ai-ready/indexnow` no longer exist. Submit URLs from the `ai-ready:page:indexed` Nitro hook: https://nuxtseo.com/docs/ai-ready/advanced/indexnow
|
|
144
|
-
- v1 renamed these. Do not write the old form:
|
|
96
|
+
- v3 requires Nuxt `^4.6.0 || ^5.0.0`; upgrade Nuxt before the module. It needs `@nuxtjs/robots` v7, `@nuxtjs/sitemap` v9, and `nuxt-site-config` v5.
|
|
97
|
+
- v3 does not install `drizzle-orm`. Database features need `npx nypm add drizzle-orm@1.0.0-rc.4`. SQLite uses `node:sqlite`; remove leftover `better-sqlite3`.
|
|
98
|
+
- v3 negotiates on `Accept` only; set `botNegotiation: true` to serve Markdown to AI bot user agents.
|
|
99
|
+
- v3 exports typed entries: server functions from `#ai-ready/server`, app functions from `#ai-ready/app`.
|
|
100
|
+
- v2 removed IndexNow. Submit URLs from the `ai-ready:page:indexed` Nitro hook.
|
|
101
|
+
- v1 renamed options. Do not write the old form:
|
|
145
102
|
|
|
146
103
|
| Old | New |
|
|
147
104
|
|-----|-----|
|
|
148
105
|
| `mdreamOptions: { preset: 'minimal' }` | `mdreamOptions: { minimal: true }` |
|
|
149
106
|
| `cacheMaxAgeSeconds` | `llmsTxtCacheSeconds` |
|
|
150
107
|
| Nitro hook `ai-ready:markdown` | `ai-ready:page:markdown` |
|
|
151
|
-
| `BulkDocument` type | `PageDocument` |
|
|
152
|
-
| `JSON.parse(page.headings)` | `page.headings` (already an array) |
|
|
153
108
|
| `?secret=TOKEN` on `/__ai-ready/*` | `Authorization: Bearer TOKEN` header |
|
|
154
109
|
|
|
155
110
|
## Config
|
|
156
111
|
|
|
157
|
-
- `llmsTxt` (`object`): generated discovery. Set `false` for application-owned server routes
|
|
158
|
-
- `llmsTxt.pages` (`'sitemap'`):
|
|
159
|
-
- `llmsTxt.
|
|
160
|
-
- `llmsTxt.maxLength` (`80000`): maximum characters per file. Minimum `1024`. Larger lists split without dropping links.
|
|
161
|
-
- `llmsFullTxt` (`true`): generate the full export and advertise its link. Set `false` to omit both.
|
|
162
|
-
- `llmsTxt.directive` (`{ markdown: true, html: false }`): a `> Index of every page on this site: [llms.txt](...)` line after the frontmatter of each page's `.md`; `html: true` adds a visually hidden `/llms.txt` link at the top of each HTML body.
|
|
163
|
-
- `llmsTxt.markdownLinks` (`true`): link page entries in `llms.txt` to their `.md` twins. `false` links canonical URLs. With `site.url` set, page links in `llms.txt`, `sitemap.md`, and `.md` bodies are absolute.
|
|
164
|
-
- `describedby` (`true`): the `describedby` link tag and header.
|
|
165
|
-
- `tools.<listPages|searchPages|getPageMarkdown>.<mcp|webmcp>.enabled`: attach a built in tool to one transport only.
|
|
112
|
+
- `llmsTxt` (`object`): generated discovery. Set `false` for application-owned server routes; a public `llms.txt` disables generation.
|
|
113
|
+
- `llmsTxt.pages` (`'sitemap'`): `'all'` includes stored pages outside the sitemap.
|
|
114
|
+
- `llmsTxt.markdownLinks` (`true`): link page entries to `.md` twins instead of canonical URLs.
|
|
166
115
|
- `autoI18n` (`true`): with `@nuxtjs/i18n`, adds hreflang `Link` headers and a languages section in `llms.txt`.
|
|
167
116
|
- Other options: https://nuxtseo.com/docs/ai-ready/api/config
|
|
168
117
|
|
|
169
118
|
## Debug
|
|
170
119
|
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
120
|
+
For example, a deployed page with negotiation enabled:
|
|
121
|
+
|
|
122
|
+
```bash
|
|
123
|
+
curl -s -H 'Accept: text/markdown' -D - -o /dev/null https://mysite.com/about
|
|
124
|
+
HTTP/1.1 307 Temporary Redirect
|
|
125
|
+
location: /about.md
|
|
126
|
+
vary: accept
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
A `200` means a cache rule turned negotiation off. `/__ai-ready__/debug.json` exists in dev, or with `debug: true`. Nuxt DevTools has an AI Ready tab (needs `nuxtseo-devtools-host`).
|
package/dist/cli.d.mts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|