{"id":27122954,"url":"https://github.com/okineadev/vitepress-plugin-llms","last_synced_at":"2025-04-07T12:33:22.019Z","repository":{"id":282449688,"uuid":"948382407","full_name":"okineadev/vitepress-plugin-llms","owner":"okineadev","description":"📜 A VitePress plugin for generating LLM-friendly documentation","archived":false,"fork":false,"pushed_at":"2025-04-05T15:15:58.000Z","size":7072,"stargazers_count":37,"open_issues_count":1,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-05T15:22:02.126Z","etag":null,"topics":["documentation","llmstxt","vite","vite-plugin","vitepress"],"latest_commit_sha":null,"homepage":"https://npmjs.com/package/vitepress-plugin-llms","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/okineadev.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"custom":["https://send.monobank.ua/jar/6rUVs4yasg","https://donatello.to/okineadev"]}},"created_at":"2025-03-14T08:36:54.000Z","updated_at":"2025-04-05T15:16:01.000Z","dependencies_parsed_at":"2025-03-14T18:38:13.543Z","dependency_job_id":"fcb4ae56-f1e8-46a9-8abe-1758b915a61e","html_url":"https://github.com/okineadev/vitepress-plugin-llms","commit_stats":null,"previous_names":["okineadev/vitepress-plugin-llms"],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/okineadev%2Fvitepress-plugin-llms","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/okineadev%2Fvitepress-plugin-llms/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/okineadev%2Fvitepress-plugin-llms/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/okineadev%2Fvitepress-plugin-llms/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/okineadev","download_url":"https://codeload.github.com/okineadev/vitepress-plugin-llms/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247653538,"owners_count":20973851,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["documentation","llmstxt","vite","vite-plugin","vitepress"],"created_at":"2025-04-07T12:33:21.500Z","updated_at":"2025-04-07T12:33:21.996Z","avatar_url":"https://github.com/okineadev.png","language":"TypeScript","funding_links":["https://send.monobank.ua/jar/6rUVs4yasg","https://donatello.to/okineadev"],"categories":["TypeScript"],"sub_categories":[],"readme":"\u003c!-- markdownlint-capture --\u003e\n\u003c!-- markdownlint-disable no-inline-html heading-start-left first-line-h1 --\u003e\n\u003cdiv align=\"center\"\u003e\n\n  \u003ca href=\"https://npmjs.com/package/vitepress-plugin-llms\"\u003e\n    \u003c!-- https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#specifying-the-theme-an-image-is-shown-to --\u003e\n    \u003cpicture\u003e\n      \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"assets/hero-dark.png\"\u003e\n      \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"assets/hero-light.png\"\u003e\n      \u003cimg src=\"assets/hero-dark.png\" alt=\"Banner\"\u003e\n    \u003c/picture\u003e\n  \u003c/a\u003e\n\n  # 📜 vitepress-plugin-llms\n\n  [![NPM Downloads](https://img.shields.io/npm/dw/vitepress-plugin-llms?logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjMDAwMDAwIj48cGF0aCBkPSJNNDgwLTMyMCAyODAtNTIwbDU2LTU4IDEwNCAxMDR2LTMyNmg4MHYzMjZsMTA0LTEwNCA1NiA1OC0yMDAgMjAwWk0xNjAtMTYwdi0yMDBoODB2MTIwaDQ4MHYtMTIwaDgwdjIwMEgxNjBaIi8%2BPC9zdmc%2B\u0026labelColor=FAFAFA\u0026color=212121)](https://www.npmjs.com/package/vitepress-plugin-llms) [![NPM Version](https://img.shields.io/npm/v/vitepress-plugin-llms?logo=npm\u0026logoColor=212121\u0026label=version\u0026labelColor=FAFAFA\u0026color=212121)](https://npmjs.com/package/vitepress-plugin-llms) [![Tests Status](https://img.shields.io/github/actions/workflow/status/okineadev/vitepress-plugin-llms/ci.yml?label=tests\u0026labelColor=212121)](https://github.com/okineadev/vitepress-plugin-llms/actions/workflows/ci.yml) [![Built with Bun](https://img.shields.io/badge/Built_with-Bun-fbf0df?logo=bun\u0026labelColor=212121)](https://bun.sh) [![Formatted with Biome](https://img.shields.io/badge/Formatted_with-Biome-60a5fa?style=flat\u0026logo=biome\u0026labelColor=212121)](https://biomejs.dev/) [![sponsor](https://img.shields.io/badge/sponsor-EA4AAA?logo=githubsponsors\u0026labelColor=FAFAFA)](https://github.com/okineadev/vitepress-plugin-llms?sponsor=1)\n\n  [🐛 Report bug](https://github.com/okineadev/vitepress-plugin-llms/issues/new?template=bug-report.yml) • [Request feature ✨](https://github.com/okineadev/vitepress-plugin-llms/issues/new?template=feature-request.yml)\n\u003c/div\u003e\n\u003c!-- markdownlint-restore --\u003e\n\n## 📦 Installation\n\n```bash\nnpm install vitepress-plugin-llms --save-dev\n```\n\n## 🛠️ Usage\n\nAdd the Vite plugin to your VitePress configuration (`.vitepress/config.ts`):\n\n```ts\nimport { defineConfig } from 'vitepress'\nimport llmstxt from 'vitepress-plugin-llms'\n\nexport default defineConfig({\n  vite: {\n    plugins: [llmstxt()]\n  }\n})\n```\n\nNow, thanks to this plugin, the LLM version of the website documentation is automatically generated\n\n### Plugin Settings\n\nSee [`src/types.d.ts`](src/types.d.ts)\n\n### Redirects (optional, but recommended ✅)\n\nIt is recommended to configure redirects so that AI can use addresses with both `.md` and `.txt` extensions\n\n#### Netlify\n\n`public/_redirects`:\n\n```plaintext\n/*.txt           /:splat.md 301\n/llms.md         /llms.txt 301\n/llms.txt        /llms.txt 200!\n/llms-full.md    /llms-full.txt 200!\n/llms-full.txt   /llms-full.txt 200!\n```\n\n\u003c!-- markdownlint-disable-next-line --\u003e\n\u003csub\u003eSyntax documentation: \u003chttps://docs.netlify.com/routing/redirects\u003e\u003c/sub\u003e\n\n#### Example Configuration\n\nHere is an example of how to configure the plugin with custom settings:\n\n```ts\nimport { defineConfig } from 'vitepress'\nimport llmstxt from 'vitepress-plugin-llms'\n\nexport default defineConfig({\n  vite: {\n    plugins: [\n      llmstxt({\n        generateLLMsFullTxt: false,\n        ignoreFiles: ['sponsors/*'],\n        customLLMsTxtTemplate: `# {title}\\n\\n{foo}`,\n        title: 'Awesome tool',\n        customTemplateVariables: {\n          foo: 'bar'\n        }\n      })\n    ]\n  }\n})\n```\n\nThis configuration does the following:\n\n- `generateLLMsFullTxt: false`: Disables the generation of the `llms-full.txt` file.\n- `ignoreFiles: ['sponsors/*']`: Ignores all files in the `sponsors` directory.\n- `customLLMsTxtTemplate`: Uses a custom template for the `llms.txt` file.\n- `title`: Sets a custom header in `llms.txt`, for your custom variables use `customTemplateVariables`.\n- `customTemplateVariables`: Sets custom variables for the template, replaces `{foo}` with `bar`.\n\n## 🚀 Why `vitepress-plugin-llms`?\n\nLLMs (Large Language Models) are great at processing text, but traditional documentation formats can be too heavy and cluttered. `vitepress-plugin-llms` generates raw Markdown documentation that LLMs can efficiently process\n\nThe file structure in `.vitepress/dist` folder will be as follows:\n\n```plaintext\n📂 .vitepress/dist\n├── ...\n├── llms-full.txt            // A file where all the website documentation is compiled into one file\n├── llms.txt                 // The main file for LLMs with all links to all sections of the documentation for LLMs\n├── markdown-examples.html   // A human-friendly version of `markdown-examples` section in HTML format\n└── markdown-examples.md     // A LLM-friendly version of `markdown-examples` section in Markdown format\n```\n\n### ✅ Key Features\n\n- ⚡️ Easy integration with VitePress\n- ✅ Zero config required, everything works out of the box\n- ⚙️ Customizable\n- 🤖 An LLM-friendly version is generated for each page\n- 📝 Generates `llms.txt` with section links\n- 📖 Generates `llms-full.txt` with all content in one file\n\n## 📖 [llmstxt.org](https://llmstxt.org/) Standard\n\nThis plugin follows the [llmstxt.org](https://llmstxt.org/) standard, which defines the best practices for LLM-friendly documentation.\n\n## ✨ Projects where this plugin is used\n\n- [**Slidev**](https://sli.dev/) - **35.7**k+ ⭐ - [llms.txt](https://sli.dev/llms.txt) | [llms-full.txt](https://sli.dev/llms-full.txt)\n- [**Elysia**](https://elysiajs.com/) - **11.9**k+ ⭐ - [llms.txt](https://elysiajs.com/llms.txt) | [llms-full.txt](https://elysiajs.com/llms-full.txt)\n- [**shadcn/vue**](https://shadcn-vue.com/) - **6.7**k+ ⭐ - [llms.txt](https://shadcn-vue.com/llms.txt) | [llms-full.txt](https://shadcn-vue.com/llms-full.txt)\n- [**Vue Macros**](https://vue-macros.dev/) - **1.8**k+ ⭐ - [llms.txt](https://vue-macros.dev/llms.txt) | [llms-full.txt](https://vue-macros.dev/llms-full.txt)\n- [**GramIO**](https://gramio.dev/) - **101**+ ⭐ - [llms.txt](https://gramio.dev/llms.txt) | [llms-full.txt](https://gramio.dev/llms-full.txt)\n\n## ❤️ Support\n\nIf you like this project, consider supporting it by starring ⭐ it on GitHub, sharing it with your friends, or [buying me a coffee ☕](https://github.com/okineadev/vitepress-plugin-llms?sponsor=1)\n\n## 🤝 Contributing\n\nYou can read the instructions for contributing here - [CONTRIBUTING.md](./CONTRIBUTING.md)\n\n## 📜 License\n\n[MIT License](./LICENSE) © 2025-present [Yurii Bogdan](https://github.com/okineadev)\n\n## 👨‍🏭 Contributors\n\nThank you to everyone who helped with the project!\n\n![Contributors](https://contributors-table.vercel.app/image?repo=okineadev/vitepress-plugin-llms\u0026width=50\u0026columns=10)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fokineadev%2Fvitepress-plugin-llms","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fokineadev%2Fvitepress-plugin-llms","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fokineadev%2Fvitepress-plugin-llms/lists"}