You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
That's it 🚀 `/llms.txt` file is automatically generated and pre-rendered.
33
33
34
+
## Raw markdown access
35
+
36
+
When `nuxt-llms` is enabled, Nuxt Content also exposes a raw markdown endpoint so you can stream LLM-ready source files without going through the full rendering pipeline.
37
+
38
+
-**Endpoint**: `/raw/<content-path>.md` (use the same path as the page URL, drop trailing `/index`, and keep the `.md` extension), returning `text/markdown; charset=utf-8`.
39
+
-**Scope**: only `page` collections are included; exclude specific collections with `llms.contentRawMarkdown.excludeCollections`{lang=ts}. Set `llms.contentRawMarkdown = false`{lang=ts} to disable the endpoint entirely.
40
+
-**Output**: if the requested document is missing a top-level heading or description, the route prepends the title and description to the markdown body before returning it.
41
+
-**llms.txt links**: document links generated in `llms.txt` are automatically rewritten to the `/raw/...md` endpoint (unless the collection is excluded or the feature is disabled) so agents fetch compact markdown instead of full HTML, reducing token usage and improving response speed.
42
+
43
+
```ts [nuxt.config.ts]
44
+
exportdefaultdefineNuxtConfig({
45
+
modules: ['@nuxt/content', 'nuxt-llms'],
46
+
llms: {
47
+
contentRawMarkdown: {
48
+
// Optional: prevent specific page collections from being exposed
49
+
excludeCollections: ['blog'],
50
+
},
51
+
},
52
+
})
53
+
```
54
+
34
55
## Sections
35
56
36
57
When generating content, you can create custom sections to process your content into LLM-friendly formats.
0 commit comments