Skip to content

Commit 541dff1

Browse files
authored
docs: generate llms.txt (#19675)
close #19400
1 parent 380c10e commit 541dff1

4 files changed

Lines changed: 334 additions & 0 deletions

File tree

docs/.vitepress/config.ts

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ import {
55
groupIconMdPlugin,
66
groupIconVitePlugin,
77
} from 'vitepress-plugin-group-icons'
8+
import llmstxt from 'vitepress-plugin-llms'
9+
import type { PluginOption } from 'vite'
810
import { buildEnd } from './buildEnd.config'
911

1012
const ogDescription = 'Next Generation Frontend Tooling'
@@ -469,6 +471,25 @@ export default defineConfig({
469471
'.gitlab-ci.yml': 'vscode-icons:file-type-gitlab',
470472
},
471473
}),
474+
llmstxt({
475+
ignoreFiles: ['blog/*', 'blog.md', 'index.md', 'team.md'],
476+
description: 'The Build Tool for the Web',
477+
details: `\
478+
- 💡 Instant Server Start
479+
- ⚡️ Lightning Fast HMR
480+
- 🛠️ Rich Features
481+
- 📦 Optimized Build
482+
- 🔩 Universal Plugin Interface
483+
- 🔑 Fully Typed APIs
484+
485+
Vite is a new breed of frontend build tooling that significantly improves the frontend development experience. It consists of two major parts:
486+
487+
- A dev server that serves your source files over [native ES modules](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules), with [rich built-in features](https://vite.dev/guide/features.md) and astonishingly fast [Hot Module Replacement (HMR)](https://vite.dev/guide/features.md#hot-module-replacement).
488+
489+
- A [build command](https://vite.dev/guide/build.md) that bundles your code with [Rollup](https://rollupjs.org), pre-configured to output highly optimized static assets for production.
490+
491+
In addition, Vite is highly extensible via its [Plugin API](https://vite.dev/guide/api-plugin.md) and [JavaScript API](https://vite.dev/guide/api-javascript.md) with full typing support.`,
492+
}) as PluginOption,
472493
],
473494
optimizeDeps: {
474495
include: [

docs/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"feed": "^4.2.2",
1414
"vitepress": "^1.6.3",
1515
"vitepress-plugin-group-icons": "^1.3.7",
16+
"vitepress-plugin-llms": "^1.1.0",
1617
"vue": "^3.5.13"
1718
}
1819
}

docs/public/_redirects

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,11 @@ https://vitejs.dev/* https://vite.dev/:splat 301!
88
/guide/comparisons /guide/why#how-vite-relates-to-other-unbundled-build-tools 301
99
/guide/comparisons.html /guide/why#how-vite-relates-to-other-unbundled-build-tools 301
1010

11+
# llms.txt
12+
/*.txt /:splat.md 301
13+
/llms.md /llms.txt 301
14+
/llms.txt /llms.txt 200!
15+
/llms-full.txt /llms-full.txt 200!
16+
1117
# short links
1218
/rolldown /guide/rolldown 301

0 commit comments

Comments
 (0)