{"id":7413,"library":"mkdocs-llmstxt","title":"MkDocs LLMstxt Plugin","description":"MkDocs plugin to generate an `/llms.txt` file, a standard for providing LLM-friendly content summaries and links from websites. It automatically processes your MkDocs documentation during the build process, creating a concise index of content accessible to AI language models. The plugin can also generate a `/llms-full.txt` file with concatenated content and per-page Markdown files. The project is currently in maintenance mode.","status":"maintenance","version":"0.5.0","language":"en","source_language":"en","source_url":"https://github.com/pawamoy/mkdocs-llmstxt","tags":["mkdocs","documentation","llm","plugin","ai","content-generation"],"install":[{"cmd":"pip install mkdocs-llmstxt","lang":"bash","label":"Install with pip"}],"dependencies":[{"reason":"This is an MkDocs plugin and requires MkDocs to function.","package":"mkdocs","optional":false},{"reason":"Requires Python 3.10 or newer.","package":"python","optional":false}],"imports":[],"quickstart":{"code":"mkdir my-llm-docs\ncd my-llm-docs\n\n# Create a minimal MkDocs config\ncat <<EOF > mkdocs.yml\nsite_name: My LLM Project\nsite_url: https://example.com/ # REQUIRED for llmstxt plugin\nsite_description: A concise description of my project for LLMs.\nplugins:\n  - llmstxt:\n      markdown_description: >\n        This is a longer, more detailed description of the project.\n        It provides additional context for AI models.\n      sections:\n        Introduction:\n          - index.md: Key concepts and overview\n        Guides:\n          - guides/*.md # Glob patterns are supported\n        API Reference:\n          - api/reference.md\nEOF\n\n# Create some example documentation files\nmkdir docs docs/guides docs/api\ncat <<EOF > docs/index.md\n# Welcome to My LLM Project\n\nThis is the main introduction to our project.\nEOF\n\ncat <<EOF > docs/guides/setup.md\n# Setup Guide\n\nFollow these steps to set up the project.\nEOF\n\ncat <<EOF > docs/api/reference.md\n# API Reference\n\nDetails about the API endpoints.\nEOF\n\n# Build the documentation, which generates llms.txt\nmkdocs build\n\necho \"\\nCheck the 'site' directory for llms.txt and the generated Markdown files.\"\n# To serve locally:\n# mkdocs serve","lang":"bash","description":"This quickstart guides you through setting up a new MkDocs project, configuring the `mkdocs-llmstxt` plugin, creating some sample documentation, and building the site to generate the `/llms.txt` file. The `site_url` configuration option is crucial for correct link generation. After building, `llms.txt` will be available in your `site` directory, along with Markdown versions of your pages if configured."},"warnings":[{"fix":"Consult the latest documentation for `mkdocs-llmstxt` to update your `mkdocs.yml` configuration.","message":"The configuration options of the `llmstxt` plugin changed significantly in version 0.2.0. If upgrading from 0.1.0, review your `mkdocs.yml` plugin configuration.","severity":"breaking","affected_versions":"<0.2.0"},{"fix":"Ensure `site_url: https://your-site.com/` (or equivalent) is set in your `mkdocs.yml`.","message":"The `site_url` option in `mkdocs.yml` is mandatory for `mkdocs-llmstxt` to function correctly and generate absolute URLs in the `/llms.txt` file. Without it, links may be relative or incorrect.","severity":"gotcha","affected_versions":"All"},{"fix":"Monitor the GitHub repository for updates on maintainership transfer or seek alternative solutions if active development is a critical requirement.","message":"The `mkdocs-llmstxt` project is currently in maintenance mode. While it continues to function, active development and new features are limited. Consider this when planning long-term usage.","severity":"gotcha","affected_versions":"0.5.0 and later"},{"fix":"Upgrade to `mkdocs-llmstxt` version 0.5.0 or later to ensure proper resolution of relative links to absolute URLs in the generated output.","message":"Prior to version 0.5.0, relative links within your documentation might not have been correctly resolved to absolute URLs in the generated `/llms.txt` or associated Markdown files.","severity":"gotcha","affected_versions":"<0.5.0"}],"env_vars":null,"last_verified":"2026-04-16T00:00:00.000Z","next_check":"2026-07-15T00:00:00.000Z","problems":[{"fix":"Ensure `pip install mkdocs-llmstxt` has been run and your `mkdocs.yml` includes:\n```yaml\nplugins:\n  - llmstxt: # ... your configuration ...\n```","cause":"The `mkdocs-llmstxt` package is not installed in your environment, or it's not correctly listed under the `plugins` section in `mkdocs.yml`.","error":"Plugin 'llmstxt' not found."},{"fix":"Add or correct the `site_url` in your `mkdocs.yml`:\n```yaml\nsite_url: https://your-domain.com/ # Must be an absolute URL\n```\nAlso ensure the `sections` configuration is present and correctly defined for the plugin.","cause":"The `site_url` configuration option is missing or incorrectly set in your `mkdocs.yml`, which is required for the plugin to generate absolute URLs.","error":"The `llms.txt` file is not generated, or the URLs within it are relative/incorrect."},{"fix":"Verify that file paths in the `sections` configuration match your `docs` directory structure. If hosting on a subdirectory or specific version, consider using the `base_url` option in your `llmstxt` plugin configuration: `plugins: - llmstxt: base_url: https://productname.hostname.io/en/0.1.34`.","cause":"This could happen if the paths specified in the `sections` configuration of `mkdocs.yml` do not correctly map to your actual Markdown files, or if the `base_url` option is needed for specific hosting environments (e.g., Read the Docs).","error":"Files listed in `llms.txt` are not found (e.g., 404 errors when an LLM tries to access them)."}]}