Skip to content

Commit 4d8ba95

Browse files
authored
feat(docs): add llms plugin (#1625)
## Summary Add `vitepress-plugin-llms` to the Vite+ docs build so the published docs include LLM-friendly documentation outputs. This follows the same plugin-based approach used by [tsdown](https://tsdown.dev/). The plugin generates `/llms.txt` during `vitepress build`, along with the corresponding Markdown files that the generated `.md` links point to. ## Details - Adds `vitepress-plugin-llms` to the docs dependencies. - Registers the plugin in `docs/.vitepress/config.mts`. - Excludes `team.md` from the LLM docs output. - Uses the docs site description as the generated `llms.txt` description. - Leaves plugin defaults enabled, so generated `.md` links in `llms.txt`are backed by actual generated Markdown files. closes #1344
1 parent e80e241 commit 4d8ba95

3 files changed

Lines changed: 718 additions & 0 deletions

File tree

docs/.vitepress/config.mts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import type { VoidZeroThemeConfig } from '@voidzero-dev/vitepress-theme';
44
import { extendConfig } from '@voidzero-dev/vitepress-theme/config';
55
import { defineConfig, type HeadConfig } from 'vitepress';
66
import { groupIconMdPlugin, groupIconVitePlugin } from 'vitepress-plugin-group-icons';
7+
import llmstxt from 'vitepress-plugin-llms';
78
import { withMermaid } from 'vitepress-plugin-mermaid';
89

910
const taskRunnerGuideItems = [
@@ -129,6 +130,11 @@ export default extendConfig(
129130
tsdown: 'https://tsdown.dev/tsdown.svg',
130131
},
131132
}),
133+
llmstxt({
134+
ignoreFiles: ['team.md'],
135+
description: 'The Unified Toolchain for the Web',
136+
details: '',
137+
}),
132138
],
133139
},
134140
themeConfig: {

docs/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
"reka-ui": "^2.7.0",
1515
"typewriter-effect": "^2.22.0",
1616
"vitepress-plugin-group-icons": "^1.7.5",
17+
"vitepress-plugin-llms": "^1.12.2",
1718
"vitepress-plugin-mermaid": "^2.0.17",
1819
"vue": "^3.5.27",
1920
"vue3-carousel": "^0.16.0"

0 commit comments

Comments
 (0)