Skip to content

Commit 6eeedd4

Browse files
docs: generate llms.txt and llms-full.txt (#465)
Add vitepress-plugin-llms to produce llms.txt (a curated, sidebar-ordered index) and llms-full.txt (full docs concatenated) at build time, served at docs.plane.so/llms.txt and /llms-full.txt for LLM/GEO consumption. - Plugin owns llms.txt / llms-full.txt only; the existing buildEnd .md copy still serves the Accept: text/markdown rewrite, so per-page generation is disabled to avoid overlap. - domain set for absolute URLs; richer description/details for the index. - noindex / search:false pages excluded via ignoreFiles. - injectLLMHint disabled to keep rendered pages untouched.
1 parent 2213583 commit 6eeedd4

3 files changed

Lines changed: 741 additions & 1 deletion

File tree

docs/.vitepress/config.ts

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { dirname, join, relative, resolve } from "path";
55
import { defineConfig, type HeadConfig } from "vitepress";
66
import { extendConfig } from "@voidzero-dev/vitepress-theme/config";
77
import { tabsMarkdownPlugin } from "vitepress-plugin-tabs";
8+
import llmstxt from "vitepress-plugin-llms";
89

910
function loadEnvVar(key: string): string | undefined {
1011
// process.env takes precedence (CI/hosting platforms set vars here)
@@ -53,6 +54,33 @@ const config = defineConfig({
5354
description: "Modern project management software",
5455
cleanUrls: true,
5556

57+
vite: {
58+
plugins: [
59+
// Generates llms.txt and llms-full.txt from the docs and sidebar.
60+
// https://github.com/okineadev/vitepress-plugin-llms
61+
llmstxt({
62+
domain: "https://docs.plane.so",
63+
description:
64+
"Plane is open-source, modern project management software for planning, tracking, and shipping work.",
65+
details:
66+
"This documentation covers workspaces, projects, work items, cycles, modules, pages and wikis, integrations, importers, automations, and Plane AI.",
67+
// Per-page .md versions are already emitted by buildEnd() for the
68+
// `Accept: text/markdown` rewrite in vercel.json, so the plugin only
69+
// owns llms.txt / llms-full.txt.
70+
generateLLMFriendlyDocsForEachPage: false,
71+
// Don't inject invisible LLM-hint markup into rendered pages.
72+
injectLLMHint: false,
73+
// Pages hidden from search (search: false / noindex) are excluded
74+
// from the LLM files too.
75+
ignoreFiles: [
76+
"core-concepts/issues.md",
77+
"core-concepts/projects/run-project.md",
78+
"importers/github-imp.md",
79+
],
80+
}),
81+
],
82+
},
83+
5684
buildEnd(siteConfig) {
5785
// Copy source .md files into dist/ for Accept: text/markdown negotiation.
5886
const srcDir = siteConfig.srcDir;

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@
2929
},
3030
"devDependencies": {
3131
"@types/node": "^25.6.0",
32-
"oxfmt": "^0.36.0"
32+
"oxfmt": "^0.36.0",
33+
"vitepress-plugin-llms": "^1.13.1"
3334
},
3435
"engines": {
3536
"node": ">=24.0.0"

0 commit comments

Comments
 (0)