{"id":26276306,"url":"https://github.com/kozmozio/kirby-llms","last_synced_at":"2026-03-01T22:25:34.681Z","repository":{"id":281214584,"uuid":"944480332","full_name":"kozmozio/kirby-llms","owner":"kozmozio","description":"A Kirby CMS plugin that generates an llms.txt file for Large Language Models","archived":false,"fork":false,"pushed_at":"2025-08-29T21:41:01.000Z","size":419,"stargazers_count":7,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-03T05:25:35.826Z","etag":null,"topics":["kirby4","kirby5","kirbycms","llms","llmstxt","robots","robotstxt"],"latest_commit_sha":null,"homepage":"","language":"PHP","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/kozmozio.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-03-07T12:21:46.000Z","updated_at":"2025-09-17T07:22:48.000Z","dependencies_parsed_at":null,"dependency_job_id":"2119363f-c7d7-44ca-b4ac-225c68ba280e","html_url":"https://github.com/kozmozio/kirby-llms","commit_stats":null,"previous_names":["kozmozio/kirby-llms"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/kozmozio/kirby-llms","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kozmozio%2Fkirby-llms","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kozmozio%2Fkirby-llms/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kozmozio%2Fkirby-llms/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kozmozio%2Fkirby-llms/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kozmozio","download_url":"https://codeload.github.com/kozmozio/kirby-llms/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kozmozio%2Fkirby-llms/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29986256,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-01T21:06:37.093Z","status":"ssl_error","status_checked_at":"2026-03-01T21:05:45.052Z","response_time":124,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["kirby4","kirby5","kirbycms","llms","llmstxt","robots","robotstxt"],"created_at":"2025-03-14T11:17:36.184Z","updated_at":"2026-03-01T22:25:34.671Z","avatar_url":"https://github.com/kozmozio.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Kozmoz Kirby LLMs Plugin\n\nA Kirby CMS plugin that generates an `llms.txt` file in the root of your website or responds to the `llms.txt` route with necessary information for Large Language Models (LLMs)\n\n![Kirby LLMs Plugin Panel Interface](kozmoz-kirby-llms.jpg)\n\n## Overview\n\nThis plugin creates an `llms.txt` file that provides structured information about your website to help Large Language Models better understand and interact with your content. Similar to how `robots.txt` works for search engines, `llms.txt` provides guidance for LLMs.\n\n## Features\n\n- Generates an `llms.txt` file in the root of your website in Markdown format\n- Generates an XML sitemap at `sitemap.xml` using the same page filtering as LLMs.txt\n- Provides dedicated routes to access both LLMs information and sitemap\n- Creates proper Markdown links for pages with trailing slashes (configurable)\n- Strips HTML tags from descriptions and metadata for clean output\n- Configurable exclusion of pages and templates\n- Configurable inclusion of pages that override exclusions\n- Groups pages by parent page name or template type with section headings (e.g. `## Blog`, `## Products`)\n- Automatic cache clearing when content changes\n- Supports configuration via your site's main config.php file\n- Panel integration for easy configuration through the Kirby admin interface\n\n## Installation\n\n### Manual Installation\n\n1. Download or clone this repository\n2. Place the folder `kirby-llms` in your `site/plugins` directory\n3. Rename the folder to `kirby-llms` if needed\n\n### Composer Installation\n\n```bash\ncomposer require kozmozio/kirby-llms\n```\n\n## Configuration\n\n### Via Config File\n\nYou can configure the plugin by adding options to your `config.php` file:\n\n```php\nreturn [\n  'kozmozio.llms' =\u003e [\n    'enabled' =\u003e true,\n    'cache' =\u003e true,\n    'cache.duration' =\u003e 60, // minutes\n    'add_trailing_slash' =\u003e true, // Whether to add trailing slashes to URLs\n    'group_by' =\u003e 'parent', // Group pages by: 'parent', 'template', or 'none'\n    'sitemap_enabled' =\u003e true, // Enable XML sitemap generation\n    'exclude' =\u003e [\n      'templates' =\u003e ['error', 'faq', 'faqs', 'faqpage', 'faq-page'],\n      'pages' =\u003e ['faqs', 'private-page', 'another-page']\n    ],\n    'include' =\u003e [\n      'pages' =\u003e ['important-page', 'always-visible'] // Pages to always include despite exclusions\n    ]\n  ]\n];\n```\n\n### Via Kirby Panel\n\nThe plugin also provides a panel interface for configuring the settings. To enable this, you need to add the LLMs tab to your site blueprint.\n\n1. Add the LLMs tab to your `site.yml` blueprint:\n\n```yaml\n# site.yml\ntitle: Site\nunlisted: true\n\ntabs:\n  # Your existing tabs...\n\n  # LLMs settings tab\n  llms: kozmoz/llms\n    \n```\n\nThis will add a new \"LLMs\" tab to your site settings in the panel, where you can configure:\n- Enable/disable the LLMs.txt generation\n- Enable/disable the XML sitemap generation\n- Enable/disable caching\n- Set cache duration\n- Enable/disable adding trailing slashes to URLs\n- Choose page grouping strategy (by parent, by template, or no grouping)\n- Exclude templates and pages\n- Include pages that should always be visible despite exclusions\n\n### Blueprint Structure\n\nThe plugin uses the following blueprint structure:\n\n```\nblueprints/\n├── kozmoz/\n│   └── llms-settings.yml  # The main settings section\n├── tabs/\n│   └── llms.yml           # The tab that extends the settings section\n```\n\nYou can customize these blueprints by copying them to your site's blueprint directory and modifying them as needed:\n\n```\nsite/\n└── blueprints/\n    ├── sections/\n    │   └── llms-settings.yml  # Your customized settings\n    └── tabs/\n        └── llms.yml           # Your customized tab\n```\n\n### Configuration Options\n\n| Option | Type | Default | Description |\n|--------|------|---------|-------------|\n| `enabled` | boolean | `true` | Enable or disable serving llms.txt |\n| `sitemap_enabled` | boolean | `true` | Enable or disable XML sitemap generation |\n| `cache` | boolean | `false` | Enable or disable caching |\n| `cache.duration` | integer | `60` | Cache duration in minutes |\n| `add_trailing_slash` | boolean | `true` | Whether to add trailing slashes to URLs in the output |\n| `group_by` | string | `'parent'` | Group pages by: `'parent'` (parent page name), `'template'` (template type), or `'none'` (flat list) |\n| `exclude.templates` | array | `['error']` | Templates to exclude from the output |\n| `exclude.pages` | array | `[]` | Pages to exclude from the output |\n| `include.pages` | array | `[]` | Pages to always include despite exclusions |\n\n### Excluding Pages\n\nYou can exclude specific pages from the llms.txt output by adding their slugs to the `exclude.pages` array in your configuration. The plugin performs matching on:\n\n- Exact page ID or URI match\n- Pages with the same name in different locations (e.g., if you exclude 'inan-olcer', both 'inan-olcer' and 'team/inan-olcer' will be excluded)\n- Child pages of excluded parents\n- Pages with URIs containing specific strings (e.g., if you exclude 'faq', all pages with 'faq' in their URI will be excluded)\n\nFor example:\n```php\n'exclude' =\u003e [\n  'pages' =\u003e ['about', 'blog/private-post', 'team-member', 'faqs']\n]\n```\n\n### Including Pages (Override Exclusions)\n\nYou can specify pages that should always be included in the output, even if they would normally be excluded by template or page exclusion rules. This is useful when you want to exclude a template globally but include specific pages that use that template.\n\nThe `include.pages` option overrides all exclusion rules and uses the same matching logic as exclusions:\n\n- Exact page ID or URI match\n- Child pages of included parents\n- Pages with URIs containing the included string\n\nFor example:\n```php\n'include' =\u003e [\n  'pages' =\u003e ['faqs', 'important-faq', 'contact']\n],\n'exclude' =\u003e [\n  'templates' =\u003e ['faqs', 'contact'], // These templates are excluded\n  'pages' =\u003e ['private-page']\n]\n```\n\nIn this example:\n- All `faqs` and `contact` template pages are excluded by default\n- But pages under `faqs/` (like `faqs/question-one`) will be included because `faqs` is in the include list\n- The `contact` page will be included despite using the excluded `contact` template\n- Any page with `important-faq` in its URI will be included\n\n**Include rules always take precedence over exclude rules.**\n\n## Usage\n\nOnce installed, the plugin automatically sets up two routes:\n\n- `yourdomain.com/llms.txt` - Generates the LLMs information in Markdown format\n- `yourdomain.com/sitemap.xml` - Generates an XML sitemap using the same page filtering\n\nThe LLMs content will be in Markdown format with proper Markdown links for pages and their descriptions. The sitemap will be in standard XML format following the sitemap protocol. All HTML tags are automatically stripped from descriptions and metadata to ensure clean, plain text output.\n\n### Automatic Cache Clearing\n\nThe plugin automatically clears its cache when:\n- Pages are created, updated, or deleted\n- Page properties change (status, slug, title, template)\n- Site information is updated\n\nThis ensures that both the `llms.txt` content and `sitemap.xml` are always up-to-date with your website's content.\n\n### Example Output\n\n#### LLMs.txt Output\n\nWith default `group_by: parent`:\n\n```markdown\n# Your Website Title\n\n\u003e Your Website Title is your website description\n\nGenerated on: 2023-06-15 12:34:56\n\n## Blog\n\n- [Article One](https://example.com/blog/article-one/) - Our first post\n- [Article Two](https://example.com/blog/article-two/) - Our second post\n\n## Products\n\n- [Widget A](https://example.com/products/widget-a/) - Our flagship widget\n- [Widget B](https://example.com/products/widget-b/) - A compact alternative\n\n## Pages\n\n- [Home](https://example.com/) - Welcome to our website\n- [About Us](https://example.com/about/) - Learn more about our company\n- [Contact](https://example.com/contact/) - Get in touch with us\n```\n\nWith `group_by: none` (flat list):\n\n```markdown\n# Your Website Title\n\n\u003e Your Website Title is your website description\n\nGenerated on: 2023-06-15 12:34:56\n\n## Docs\n\n- [Home](https://example.com/) - Welcome to our website\n- [About Us](https://example.com/about/) - Learn more about our company and our mission\n- [Products](https://example.com/products/) - Explore our range of products\n- [Blog](https://example.com/blog/) - Read our latest articles\n- [Contact](https://example.com/contact/) - Get in touch with us\n```\n\n#### Sitemap.xml Output\n\n```xml\n\u003c?xml version=\"1.0\" encoding=\"UTF-8\"?\u003e\n\u003curlset xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\"\u003e\n  \u003curl\u003e\n    \u003cloc\u003ehttps://example.com/\u003c/loc\u003e\n    \u003clastmod\u003e2023-06-15T12:34:56+00:00\u003c/lastmod\u003e\n    \u003cchangefreq\u003edaily\u003c/changefreq\u003e\n    \u003cpriority\u003e1.0\u003c/priority\u003e\n  \u003c/url\u003e\n  \u003curl\u003e\n    \u003cloc\u003ehttps://example.com/about/\u003c/loc\u003e\n    \u003clastmod\u003e2023-06-10T08:20:15+00:00\u003c/lastmod\u003e\n    \u003cchangefreq\u003eweekly\u003c/changefreq\u003e\n    \u003cpriority\u003e0.8\u003c/priority\u003e\n  \u003c/url\u003e\n  \u003curl\u003e\n    \u003cloc\u003ehttps://example.com/products/\u003c/loc\u003e\n    \u003clastmod\u003e2023-06-12T14:45:30+00:00\u003c/lastmod\u003e\n    \u003cchangefreq\u003eweekly\u003c/changefreq\u003e\n    \u003cpriority\u003e0.8\u003c/priority\u003e\n  \u003c/url\u003e\n\u003c/urlset\u003e\n```\n\n## Static Site Generation\n\nIf you're using a static site generator with Kirby, make sure to include both routes in your static routes:\n\n```php\narray_push($staticRoutes, [\n  'path' =\u003e 'llms.txt', \n  'route' =\u003e 'llms.txt'\n]);\n\narray_push($staticRoutes, [\n  'path' =\u003e 'sitemap.xml', \n  'route' =\u003e 'sitemap.xml'\n]);\n```\n\n## Development Status\n\n### Phase 1: Basic Structure and Setup ✓\n\n1. Create plugin folder structure ✓\n2. Set up plugin initialization ✓\n3. Register the route for `llms.txt` ✓\n4. Implement basic configuration options ✓\n\n### Phase 2: Core Functionality ✓\n\n1. Develop the content generator for `llms.txt` ✓\n2. Implement page collection and filtering ✓\n3. Create the response formatter ✓\n4. Add caching mechanism ✓\n\n### Phase 3: Advanced Features ✓\n\n1. Add customization options for content exclusion ✓\n2. Implement metadata extraction ✓\n3. Add automatic cache clearing when content changes ✓\n4. Strip HTML tags from descriptions and metadata ✓\n5. Ensure URLs have trailing slashes ✓\n\n### Phase 4: Testing and Documentation ✓\n\n1. Test with different Kirby setups ✓\n2. Create comprehensive documentation ✓\n3. Add examples and use cases ✓\n4. Prepare for release ✓\n\n## Author\n\n[Inan Olcer Kozmoz](https://kozmoz.io)\n\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkozmozio%2Fkirby-llms","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkozmozio%2Fkirby-llms","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkozmozio%2Fkirby-llms/lists"}