nuxt-ai-ready 0.3.7 → 0.4.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/README.md +8 -14
- package/dist/module.d.mts +13 -20
- package/dist/module.json +1 -1
- package/dist/module.mjs +384 -380
- package/dist/runtime/{llms-txt.d.ts → llms-txt-utils.d.ts} +2 -0
- package/dist/runtime/llms-txt-utils.js +114 -0
- package/dist/runtime/nuxt/plugins/{prerender.js → md-hints.prerender.js} +1 -1
- package/dist/runtime/server/mcp/resources/pages.d.ts +17 -0
- package/dist/runtime/server/mcp/{dev/resources → resources}/pages.js +5 -4
- package/dist/runtime/server/mcp/tools/list-pages.d.ts +16 -0
- package/dist/runtime/server/mcp/tools/list-pages.js +11 -0
- package/dist/runtime/server/mcp/tools/search-pages-fuzzy.d.ts +3 -0
- package/dist/runtime/server/mcp/tools/search-pages-fuzzy.js +25 -0
- package/dist/runtime/server/middleware/markdown.js +62 -0
- package/dist/runtime/server/middleware/markdown.prerender.d.ts +2 -0
- package/dist/runtime/server/middleware/markdown.prerender.js +35 -0
- package/dist/runtime/server/routes/llms-full.txt.get.d.ts +2 -0
- package/dist/runtime/server/routes/llms-full.txt.get.js +5 -0
- package/dist/runtime/server/routes/llms.txt.get.js +18 -18
- package/dist/runtime/server/utils/pageData.d.ts +25 -0
- package/dist/runtime/server/utils/pageData.js +25 -0
- package/dist/runtime/server/utils/sitemap.d.ts +6 -0
- package/dist/runtime/server/utils/sitemap.js +25 -0
- package/dist/runtime/server/utils.d.ts +15 -3
- package/dist/runtime/server/utils.js +93 -45
- package/dist/runtime/types.d.ts +25 -52
- package/dist/types.d.mts +1 -1
- package/package.json +16 -15
- package/dist/runtime/llms-txt.js +0 -35
- package/dist/runtime/server/mcp/dev/tools/list-pages.js +0 -10
- package/dist/runtime/server/mcp/dev/utils.js +0 -34
- package/dist/runtime/server/mcp/prod/resources/pages-chunks.js +0 -25
- package/dist/runtime/server/mcp/prod/resources/pages.js +0 -25
- package/dist/runtime/server/mcp/prod/tools/list-pages.js +0 -21
- package/dist/runtime/server/mcp/utils.d.ts +0 -3
- package/dist/runtime/server/mcp/utils.js +0 -7
- package/dist/runtime/server/middleware/mdream.js +0 -148
- package/dist/runtime/server/plugins/sitemap-lastmod.d.ts +0 -2
- package/dist/runtime/server/plugins/sitemap-lastmod.js +0 -22
- /package/dist/runtime/nuxt/plugins/{prerender.d.ts → md-hints.prerender.d.ts} +0 -0
- /package/dist/runtime/server/middleware/{mdream.d.ts → markdown.d.ts} +0 -0
package/README.md
CHANGED
|
@@ -8,26 +8,20 @@
|
|
|
8
8
|
|
|
9
9
|
## Why Nuxt AI Ready?
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
to drive traffic and engagement back to you.
|
|
11
|
+
ChatGPT search interest doubled in the past year. Users now ask AI assistants questions your site could answer—but LLMs only cite sources they can parse.
|
|
13
12
|
|
|
14
|
-
|
|
15
|
-
can be complex and time-consuming.
|
|
13
|
+
Two standards are emerging: [llms.txt](https://llmstxt.org/) (4,400 searches/mo, +26,900% YoY) for AI-readable site summaries, and [MCP](https://modelcontextprotocol.io/) (22,200 searches/mo) for letting agents query your content directly.
|
|
16
14
|
|
|
17
|
-
|
|
18
|
-
- **🔗 Direct site queries for LLMs**: MCP support means assistants can pull live data from you, not just static snippets from their training.
|
|
19
|
-
|
|
20
|
-
Nuxt AI Ready converts your indexable pages into clean markdown that AI systems can consume, generates the right artifacts at build time, and serves AI-friendly formats to bots automatically.
|
|
15
|
+
Nuxt AI Ready implements both. It converts your pages to markdown, generates llms.txt at build time, and exposes an MCP server for AI agents to search your site.
|
|
21
16
|
|
|
22
17
|
## Features
|
|
23
18
|
|
|
24
|
-
- 📄 **
|
|
19
|
+
- 📄 **llms.txt Generation**: Auto-generate `llms.txt` and `llms-full.txt` with page metadata and full markdown content
|
|
25
20
|
- 🚀 **On-Demand Markdown**: Any route available as `.md` (e.g., `/about` → `/about.md`), automatically served to AI crawlers
|
|
26
|
-
- 📡 **Content Signals**:
|
|
27
|
-
- 🌐 **
|
|
28
|
-
-
|
|
29
|
-
-
|
|
30
|
-
- ⏱️ **Automatic Last Updated**: Content freshness automatically tracked and added to your [sitemap.xml](https://nuxtseo.com/docs/ai-ready/guides/automatic-updated-at)
|
|
21
|
+
- 📡 **Content Signals**: Configure AI training/search/input permissions via [Nuxt Robots](https://nuxtseo.com/robots)
|
|
22
|
+
- 🌐 **Sitemap Integration**: Index AI-allowed pages via [Nuxt Sitemap](https://nuxtseo.com/sitemap)
|
|
23
|
+
- ⚡ **MCP Server**: `list_pages` and `search_pages_fuzzy` tools for AI agents to query your site
|
|
24
|
+
- 🧠 **[RAG Ready](https://nuxtseo.com/ai-ready/advanced/rag-example)**: Markdown output optimized for vectorizing and semantic search
|
|
31
25
|
|
|
32
26
|
## Installation
|
|
33
27
|
|
package/dist/module.d.mts
CHANGED
|
@@ -1,24 +1,22 @@
|
|
|
1
1
|
import * as _nuxt_schema from '@nuxt/schema';
|
|
2
|
-
import {
|
|
3
|
-
export {
|
|
2
|
+
import { ModuleOptions, LlmsTxtConfig } from '../dist/runtime/types.js';
|
|
3
|
+
export { ModuleOptions } from '../dist/runtime/types.js';
|
|
4
|
+
|
|
5
|
+
interface ParsedMarkdownResult {
|
|
6
|
+
markdown: string;
|
|
7
|
+
title: string;
|
|
8
|
+
description: string;
|
|
9
|
+
headings: Array<Record<string, string>>;
|
|
10
|
+
updatedAt?: string;
|
|
11
|
+
}
|
|
4
12
|
|
|
5
13
|
interface ModuleHooks {
|
|
6
14
|
/**
|
|
7
|
-
* Hook
|
|
8
|
-
*
|
|
15
|
+
* Hook called when page markdown is generated during prerendering.
|
|
16
|
+
* Called with route and markdown content when content has changed.
|
|
9
17
|
*/
|
|
10
|
-
'ai-ready:
|
|
11
|
-
routes: Record<string, string>;
|
|
12
|
-
}) => void | Promise<void>;
|
|
13
|
-
/**
|
|
14
|
-
* Hook called for each chunk generated during prerendering for bulk export
|
|
15
|
-
*/
|
|
16
|
-
'ai-ready:chunk': (context: {
|
|
17
|
-
chunk: BulkChunk;
|
|
18
|
+
'ai-ready:page:markdown': (context: ParsedMarkdownResult & {
|
|
18
19
|
route: string;
|
|
19
|
-
title: string;
|
|
20
|
-
description: string;
|
|
21
|
-
headings: Array<Record<string, string>>;
|
|
22
20
|
}) => void | Promise<void>;
|
|
23
21
|
/**
|
|
24
22
|
* Hook to modify llms.txt configuration before it is finalized
|
|
@@ -36,10 +34,5 @@ interface ModulePublicRuntimeConfig {
|
|
|
36
34
|
}
|
|
37
35
|
declare const _default: _nuxt_schema.NuxtModule<ModuleOptions, ModuleOptions, false>;
|
|
38
36
|
|
|
39
|
-
declare module '@nuxt/schema' {
|
|
40
|
-
interface NuxtHooks extends ModuleHooks {
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
|
|
44
37
|
export { _default as default };
|
|
45
38
|
export type { ModuleHooks, ModulePublicRuntimeConfig };
|