
Security News
November CVEs Fell 25% YoY, Driven by Slowdowns at Major CNAs
November CVE publications fell 25% YoY even as 2025 totals rose, showing how a few major CNAs can swing “global” counts and skew perceived risk.
vitepress-knowledge
Advanced tools
This page only documents the NPM package options. See this page to get started.
pnpm i vitepress-knowledge
Generate knowledge files for AI models to use. This plugin works by converting the final HTML files rendered by Vitepress back into markdown, then merging them into one (or more) files that is hosted on the production version of your website.
Extend the knowledge plugin:
// docs/.vitepress/config.ts
import { defineConfig } from "vitepress";
import knowledge from "vitepress-knowledge";
export default defineConfig({
extends: knowledge({
// Plugin config goes here...
}),
});
Build your site:
$ vitepress build docs
vitepress v1.5.0
âś“ building client + server bundles...
âś“ rendering pages...
âś“ [knowledge] generated docs/.vitepress/dist/knowledge/docs.txt
âś“ [knowledge] generated docs/.vitepress/dist/knowledge/index.json
build complete in 2.57s.
And that's it! Your knowledge files will be listed at https://example.com/knowledge/index.json on your production site. Knowledge files are not generated during development.
You can group knowledge based on the markdown file's base paths. For example, if you want to separate the API reference and blog out into their own files:
export default defineConfig({
extends: knowledge({
paths: {
"/": "docs",
"/api/": "api-reference",
"/blog/": "blog",
},
}),
});
This will output the following files:
knowledge/docs.txtknowledge/api-reference.txtknowledge/blog.txtTo prevent a markdown file from being added to the knowledge files, use the ignore option:
export default defineConfig({
extends: knowledge({
ignore: ["privacy-policy.md"],
}),
});
Pages are ordered inside knowledge files in the same order as they are listed in your theme.sidebar definition. This makes sure the AI is given context in the same order as a new user would read your docs.
So to change the order that your knowledge files are built, change the order of your sidebar.
Any pages not listed in the sidebar are put at the end of the knowledge files, sorted alphabetically.
By default, this plugin only adds the documentation part of each page to the knowledge file, ignoring navigation (top nav, sidebar, and aside). To customize which content should be added to the knowledge file, you can use the selector, layoutSelectors, and pageSelectors options.
pageSelectors: Specify which content should be added for a specific pagelayoutSelectors: Specify which content should be added for a specific layout (if not specified in the pageSelectors)selector: Specify which content should be added (if not specified in the pageSelectors or layoutSelectors)By default, standard layouts provided by the default theme have default selectors applied for you automatically.
You can use the extends option to extend another theme.
export default defineConfig({
extends: knowledge({
extends: someOtherTheme(),
}),
});
Right now, this package probably won't work with any theme other than the default. It assumes you're using the default theme to detect the order of pages and provide default layout selectors.
FAQs
VitePress plugin for generating AI knowledge files for LLMs
We found that vitepress-knowledge demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
November CVE publications fell 25% YoY even as 2025 totals rose, showing how a few major CNAs can swing “global” counts and skew perceived risk.

Security News
React disclosed a CVSS 10.0 RCE in React Server Components and is advising users to upgrade affected packages and frameworks to patched versions now.

Research
/Security News
We spotted a wave of auto-generated “elf-*” npm packages published every two minutes from new accounts, with simple malware variants and early takedowns underway.