{"id":28477437,"url":"https://github.com/cmaas/eleventy-plugin-llms","last_synced_at":"2025-06-30T08:32:50.600Z","repository":{"id":297234628,"uuid":"996102451","full_name":"cmaas/eleventy-plugin-llms","owner":"cmaas","description":"A plugin for 11ty to generate llms.txt and llms-full.txt","archived":false,"fork":false,"pushed_at":"2025-06-04T13:18:16.000Z","size":6,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-04T20:31:45.234Z","etag":null,"topics":["11ty-plugin","eleventy-plugin","llms-txt","llmstxt"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/cmaas.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"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,"zenodo":null}},"created_at":"2025-06-04T13:09:46.000Z","updated_at":"2025-06-04T13:18:18.000Z","dependencies_parsed_at":"2025-06-04T20:32:02.269Z","dependency_job_id":null,"html_url":"https://github.com/cmaas/eleventy-plugin-llms","commit_stats":null,"previous_names":["cmaas/eleventy-plugin-llms"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/cmaas/eleventy-plugin-llms","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmaas%2Feleventy-plugin-llms","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmaas%2Feleventy-plugin-llms/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmaas%2Feleventy-plugin-llms/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmaas%2Feleventy-plugin-llms/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cmaas","download_url":"https://codeload.github.com/cmaas/eleventy-plugin-llms/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmaas%2Feleventy-plugin-llms/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262739172,"owners_count":23356664,"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":["11ty-plugin","eleventy-plugin","llms-txt","llmstxt"],"created_at":"2025-06-07T16:13:50.930Z","updated_at":"2025-06-30T08:32:50.585Z","avatar_url":"https://github.com/cmaas.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Eleventy Plugin: Generator for `llms.txt` and `llms-full.txt`\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT)\n\nA plugin for 11ty to automatically generate `llms.txt` and `llms-full.txt` files specifically formatted for Large Language Models (LLMs):\n\n1.  `llms.txt`: A master index of your site's content with titles and absolute URLs, perfect for providing LLMs with a sitemap.\n2.  `llms-full.txt`: A concatenated corpus of all your eligible Markdown content (frontmatter stripped), ideal for fine-tuning, retrieval-augmented generation (RAG), or creating a knowledge base.\n\nMore info at [llmstxt.org](https://llmstxt.org/).\n\n## Features\n\n*   **Automatic `llms.txt` Generation**: Creates a Markdown-formatted list of all your live documents with links (like a Sitemap).\n*   **Automatic `llms-full.txt` Generation**: Concatenates the content of all eligible Markdown files into a single text file.\n*   **Configurable Header**: Add a custom header to both generated files.\n*   **Draft Exclusion**: Automatically excludes draft posts (or those with `eleventyExcludeFromCollections: true`).\n*   **Content Exclusion**: Fine-grained control to exclude specific pages using frontmatter (`robots: noindex` or `excludeFromLlms: true`).\n*   **Absolute URLs**: Generates full, absolute URLs for `llms.txt` using your site's base URL.\n*   **Source Comments (Optional)**: Include comments in `llms-full.txt` indicating the source file for each content block.\n\n## Installation\n\n```bash\nnpm install eleventy-plugin-llms --save-dev\n```\n\n## Usage\n\nOpen your Eleventy config file (usually `.eleventy.js`) and add the plugin:\n\n```javascript\nconst eleventyPluginLlms = require('eleventy-plugin-llms');\n\nmodule.exports = (eleventyConfig) =\u003e {\n\televentyConfig.addPlugin(eleventyPluginLlms, {\n    \tsiteUrl: \"https://www.example.com\", // REQUIRED for absolute URLs\n    \theaderText: `# My Static Site - LLM Corpus\n\nThis document contains content from My Static Site, prepared for LLM consumption.\n\n## Documents Index`,\n    // See more options below!\n\t});\n\n  \t// Your other Eleventy configurations...\n};\n```\n\nThe plugin will then generate `llms.txt` and `llms-full.txt` in your output directory (e.g., `_site/`) after each Eleventy build.\n\n## Configuration Options\n\nYou can pass an options object as the second argument to `addPlugin`. Here are the available options:\n\n| Option                  | Type       | Description                                                                                                                               |\n| :---------------------- | :--------- | :---------------------------------------------------------------------------------------------------------------------------------------- |\n| `siteUrl`               | `String`   | **Default:** `\"\"` \u003cbr/\u003e **REQUIRED for absolute URLs.** Your site's full base URL (e.g., \"https://www.example.com\"). A warning is issued if not set, and links in `llms.txt` will be relative. |\n| `headerText`            | `String`   | **Default:** `\"# My Site LLM Data\\n\\nThis file contains information about the site's content, formatted for Large Language Models.\\n\\n## Documents\"` \u003cbr/\u003e The header content prepended to both generated files. Supports Markdown. |\n| `llmsFilename`          | `String`   | **Default:** `\"llms.txt\"` \u003cbr/\u003e The filename for the document index file.                                                                   |\n| `llmsFullFilename`      | `String`   | **Default:** `\"llms-full.txt\"` \u003cbr/\u003e The filename for the concatenated full content file.                                                      |\n| `includeDrafts`         | `Boolean`  | **Default:** `false` \u003cbr/\u003e Set to `true` to include documents marked as drafts (e.g., `draft: true` or `eleventyExcludeFromCollections: true` in frontmatter). |\n| `markdownOnly`          | `Boolean`  | **Default:** `true` \u003cbr/\u003e If `true`, only processes files with a `.md` extension.                                                          |\n| `includeSourceComment`  | `Boolean`  | **Default:** `true` \u003cbr/\u003e If `true`, adds an HTML comment `\u003c!-- Source: path/to/file.md --\u003e` before each document's content in `llms-full.txt`. |\n| `defaultTitleFormatter` | `Function` | **Default:** A function that takes `inputPath`, extracts the filename, replaces hyphens/underscores with spaces, and title-cases it. \u003cbr/\u003e A function `(inputPath) =\u003e string` to generate a title if one isn't found in the document's frontmatter. |\n\n## Excluding Content from LLM Files\n\nDrafts are automatically excluded unless you set `includeDrafts` to true. Furthermore, you can specify in the front matter of every Markdown file whether to exclude it.\n\nA document will be **excluded** if its frontmatter contains `robots: noindex` or `excludeFromLlms: true`\n\nThis allows you to easily omit pages like 404 error pages, private drafts, or any other content you don't want to feed to LLMs.\n\n**Example: Excluding a 404 Page**\n\nLet's say you have a `404.md` page:\n\n```markdown\n---\ntitle: Page Not Found\npermalink: /404.html\nlayout: layouts/base.njk\neleventyExcludeFromCollections: true # Already excluded from sitemaps, etc.\nrobots: noindex # Add this to exclude from LLM files\nexcludeFromLlms: true # This would also work\n---\n# 404 Page Not Found\n\nThe page you were looking for doesn't exist.\nYou might have mistyped the address, or the page may have moved.\n```\n\nBy adding `robots: noindex` (or `excludeFromLlms: true`), this 404 page will not appear in `llms.txt` or have its content included in `llms-full.txt`.\n\nEnjoy!","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcmaas%2Feleventy-plugin-llms","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcmaas%2Feleventy-plugin-llms","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcmaas%2Feleventy-plugin-llms/lists"}