Registry / llm-agents / mkdocs-llmstxt

mkdocs-llmstxt

JSON →
library0.5.0pypypiunverified

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.

pip install mkdocs-llmstxt
INSTALL
IMPORT
SIG · MKDOCS-LLMSTXT
M
mkdocs-llmstxt
llm-agentspythonv0.5.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

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.

mkdir my-llm-docs cd my-llm-docs # Create a minimal MkDocs config cat <<EOF > mkdocs.yml site_name: My LLM Project site_url: https://example.com/ # REQUIRED for llmstxt plugin site_description: A concise description of my project for LLMs. plugins: - llmstxt: markdown_description: > This is a longer, more detailed description of the project. It provides additional context for AI models. sections: Introduction: - index.md: Key concepts and overview Guides: - guides/*.md # Glob patterns are supported API Reference: - api/reference.md EOF # Create some example documentation files mkdir docs docs/guides docs/api cat <<EOF > docs/index.md # Welcome to My LLM Project This is the main introduction to our project. EOF cat <<EOF > docs/guides/setup.md # Setup Guide Follow these steps to set up the project. EOF cat <<EOF > docs/api/reference.md # API Reference Details about the API endpoints. EOF # Build the documentation, which generates llms.txt mkdocs build echo "\nCheck the 'site' directory for llms.txt and the generated Markdown files." # To serve locally: # mkdocs serve
Debug
Known issues
breakingThe 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.
fix
Consult the latest documentation for `mkdocs-llmstxt` to update your `mkdocs.yml` configuration.
affects: <0.2.0
gotchaThe `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.
fix
Ensure `site_url: https://your-site.com/` (or equivalent) is set in your `mkdocs.yml`.
affects: All
gotchaThe `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.
fix
Monitor the GitHub repository for updates on maintainership transfer or seek alternative solutions if active development is a critical requirement.
affects: 0.5.0 and later
gotchaPrior 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.
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.
affects: <0.5.0
Errors
Common errors & fixes
Plugin 'llmstxt' not found.
The `mkdocs-llmstxt` package is not installed in your environment, or it's not correctly listed under the `plugins` section in `mkdocs.yml`.
fix
Ensure `pip install mkdocs-llmstxt` has been run and your `mkdocs.yml` includes:
```yaml
plugins:
  - llmstxt: # ... your configuration ...
```
The `llms.txt` file is not generated, or the URLs within it are relative/incorrect.
The `site_url` configuration option is missing or incorrectly set in your `mkdocs.yml`, which is required for the plugin to generate absolute URLs.
fix
Add or correct the `site_url` in your `mkdocs.yml`:
```yaml
site_url: https://your-domain.com/ # Must be an absolute URL
```
Also ensure the `sections` configuration is present and correctly defined for the plugin.
Files listed in `llms.txt` are not found (e.g., 404 errors when an LLM tries to access them).
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).
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`.
Upgrade
Version history
0.5.0latest on PyPI · released Nov 20, 2025
Audit
Dependencies
mkdocsrequiredThis is an MkDocs plugin and requires MkDocs to function.
pythonrequiredRequires Python 3.10 or newer.
Agent activity
16 hits · last 30 days
node
14
OpenAI (training)
1
Resources
mkdocs-llmstxt — pip install mkdocs-llmstxt · libregistry