Skip to content

Commit e0b4901

Browse files
docs: add llms.txt and llms-full.txt support (#2298)
1 parent 24d5e08 commit e0b4901

File tree

4 files changed

+345
-8
lines changed

4 files changed

+345
-8
lines changed

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,15 @@ Contribution to open-source project is everything from spreading the word, writi
100100

101101
This project exists thanks to [all the people][Contributors] who contribute. [[Contribute](CONTRIBUTING.md)].
102102

103+
## Docs for LLMs
104+
105+
For developers working with AI and language models, we provide specialized documentation files following the [llms.txt specification](https://llmstxt.org/):
106+
107+
- **[llms.txt](https://lingui.dev/llms.txt)** - Concise documentation optimized for LLM context windows
108+
- **[llms-full.txt](https://lingui.dev/llms-full.txt)** - Comprehensive documentation including all referenced URLs
109+
110+
These files provide LLM-friendly content in a standardized format, helping language models understand and work with Lingui's documentation at inference time. The format is designed to be both human and LLM readable, with structured information that can be processed programmatically.
111+
103112
## License
104113

105114
The project is licensed under the [MIT][License] license.

website/docusaurus.config.ts

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,19 @@ const config: Config = {
144144
},
145145
],
146146
},
147+
{
148+
title: "Docs for LLMs",
149+
items: [
150+
{
151+
label: "llms.txt",
152+
href: "https://lingui.dev/llms.txt",
153+
},
154+
{
155+
label: "llms-full.txt",
156+
href: "https://lingui.dev/llms-full.txt",
157+
},
158+
],
159+
},
147160
],
148161
},
149162
algolia: {
@@ -190,7 +203,19 @@ const config: Config = {
190203
} satisfies Preset.Options,
191204
],
192205
],
193-
plugins: ["docusaurus-plugin-sass"],
206+
plugins: [
207+
"docusaurus-plugin-sass",
208+
[
209+
"@signalwire/docusaurus-plugin-llms-txt",
210+
{
211+
content: {
212+
enableLlmsFullTxt: true,
213+
excludeRoutes: ["/", "/search", "/community", "/misc/*", "/releases/*"],
214+
},
215+
includeOrder: ["/installation", "/tutorials/**", "/guides/**", "/ref/**", "/examples/**"],
216+
},
217+
],
218+
],
194219
};
195220

196221
export default config;

website/package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"swizzle": "docusaurus swizzle",
1010
"clear": "docusaurus clear",
1111
"serve": "docusaurus serve",
12-
"lint": "eslint src *.js *.ts && remark . --ext md,mdx --quiet --frail --rc-path .remarkrc.mjs",
12+
"lint": "eslint src *.js *.ts && remark . --ext md,mdx --quiet --frail --rc-path .remarkrc.mjs --ignore-path .gitignore",
1313
"lintFix": "eslint --fix src *.js *.ts",
1414
"checkFormat": "prettier --check .",
1515
"fixFormat": "prettier --write ."
@@ -20,8 +20,10 @@
2020
"@docusaurus/remark-plugin-npm2yarn": "3.6.3",
2121
"@docusaurus/theme-mermaid": "3.6.3",
2222
"@mdx-js/react": "3.1.0",
23+
"@signalwire/docusaurus-plugin-llms-txt": "^1.2.2",
2324
"clsx": "2.1.1",
2425
"docusaurus-plugin-sass": "^0.2.6",
26+
"prism-react-renderer": "^2.4.1",
2527
"react": "19.0.0",
2628
"react-dom": "19.0.0",
2729
"sass": "^1.83.0"

0 commit comments

Comments
 (0)