mkdocs-llmstxt-md


Namemkdocs-llmstxt-md JSON
Version 0.2.0 PyPI version JSON
download
home_pageNone
SummaryMkDocs plugin for LLM-friendly documentation with direct markdown serving
upload_time2025-08-01 14:14:10
maintainerNone
docs_urlNone
authorNone
requires_python>=3.9
licenseMIT
keywords mkdocs plugin llm documentation markdown ai
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # mkdocs-llmstxt-md

MkDocs plugin for LLM-friendly documentation that provides:

1. **Direct markdown serving** - Access original markdown at `page.md` URLs
2. **llms.txt generation** - Concise index file for LLM context
3. **llms-full.txt generation** - Complete documentation in single file
4. **Copy-to-markdown button** - Easy copying of source markdown

## Features

- 🚀 **Source-first approach** - Works with original markdown, no HTML parsing
- 🤖 **LLM optimized** - Token-efficient formats for AI consumption
- 📋 **Copy button** - One-click markdown copying for developers
- 🔗 **Dual URLs** - Both human-readable HTML and LLM-friendly markdown

This plugin is inspired by `mkdocs-llmstxt`, the key difference is that `mkdocs-llmstxt` take the parsing HTML approach which can be used with injected HTML. This plugin focus on the raw markdown approach, which makes things simpler if you only need to work with markdown content.
## Installation

```bash
uv pip install mkdocs-llmstxt-md
# or with pip
pip install mkdocs-llmstxt-md
```


## Usage

Add to your `mkdocs.yml`:

```yaml
plugins:
  - llms-txt:
      sections:
        "Getting Started":
          - index.md: "Introduction to the project"
          - quickstart.md
        "API Reference":
          - api/*.md
```

## Configuration

- `sections`: Dict of section names to file patterns
- `enable_markdown_urls`: Enable .md URL serving (default: true)
- `enable_llms_txt`: Generate llms.txt (default: true)
- `enable_llms_full`: Generate llms-full.txt (default: true)
- `enable_copy_button`: Add copy button to pages (default: true)

## Developer Setup

### Prerequisites

- Python 3.8+
- uv (recommended) or pip

### Installation for Development

1. Clone the repository:
   ```bash
   git clone <repository-url>
   cd mkdocs-llmstxt-md
   ```

2. Install in development mode:
   ```bash
   uv pip install -e .
   # or with pip
   pip install -e .
   ```

3. Verify installation:
   ```bash
   uv pip list | grep mkdocs-llmstxt-md
   # or with pip
   pip list | grep mkdocs-llmstxt-md
   ```

### Testing with the Test Site

The project includes a complete test site in `test-site/` to validate all plugin features:

1. **Build the test site:**
   ```bash
   cd test-site
   mkdocs build
   ```

2. **Serve the test site locally:**
   ```bash
   mkdocs serve
   ```
   Visit http://localhost:8000 to see the documentation

3. **Validate generated files:**
   After building, check the `test-site/site/` directory for:
   - `llms.txt` - Index file with markdown URLs
   - `llms-full.txt` - Complete documentation
   - `*.md` files alongside HTML pages (e.g., `index.md`, `quickstart/index.md`)
   - Copy button on each page (top-right corner)

4. **Test markdown URL access:**
   - Visit http://localhost:8000/index.md to see raw markdown
   - Visit http://localhost:8000/quickstart/index.md for quickstart markdown
   - Compare with HTML versions at http://localhost:8000/ and http://localhost:8000/quickstart/

### Test Site Structure

The test site demonstrates all plugin features:

```
test-site/
├── mkdocs.yml          # Plugin configuration example
└── docs/
    ├── index.md        # Homepage with tables and code
    ├── quickstart.md   # Getting started guide
    ├── installation.md # Detailed setup instructions
    ├── api/
    │   ├── overview.md # API documentation
    │   └── functions.md# Function reference
    └── advanced/
        └── configuration.md # Advanced config examples
```

### Running Tests

Currently manual testing via the test site. Future versions will include automated tests.

### Making Changes

1. Modify code in `src/mkdocs_llmstxt_md/`
2. Test changes: `cd test-site && mkdocs build`
3. Validate all features work as expected
4. Check generated files in `test-site/site/`

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "mkdocs-llmstxt-md",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": "mkdocs, plugin, llm, documentation, markdown, ai",
    "author": null,
    "author_email": "Nok Lam Chan <mediumnok@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/be/86/a899ef021e44e358544b31fd3e34aa566ff876650e7dbede3e677053a492/mkdocs_llmstxt_md-0.2.0.tar.gz",
    "platform": null,
    "description": "# mkdocs-llmstxt-md\n\nMkDocs plugin for LLM-friendly documentation that provides:\n\n1. **Direct markdown serving** - Access original markdown at `page.md` URLs\n2. **llms.txt generation** - Concise index file for LLM context\n3. **llms-full.txt generation** - Complete documentation in single file\n4. **Copy-to-markdown button** - Easy copying of source markdown\n\n## Features\n\n- \ud83d\ude80 **Source-first approach** - Works with original markdown, no HTML parsing\n- \ud83e\udd16 **LLM optimized** - Token-efficient formats for AI consumption\n- \ud83d\udccb **Copy button** - One-click markdown copying for developers\n- \ud83d\udd17 **Dual URLs** - Both human-readable HTML and LLM-friendly markdown\n\nThis plugin is inspired by `mkdocs-llmstxt`, the key difference is that `mkdocs-llmstxt` take the parsing HTML approach which can be used with injected HTML. This plugin focus on the raw markdown approach, which makes things simpler if you only need to work with markdown content.\n## Installation\n\n```bash\nuv pip install mkdocs-llmstxt-md\n# or with pip\npip install mkdocs-llmstxt-md\n```\n\n\n## Usage\n\nAdd to your `mkdocs.yml`:\n\n```yaml\nplugins:\n  - llms-txt:\n      sections:\n        \"Getting Started\":\n          - index.md: \"Introduction to the project\"\n          - quickstart.md\n        \"API Reference\":\n          - api/*.md\n```\n\n## Configuration\n\n- `sections`: Dict of section names to file patterns\n- `enable_markdown_urls`: Enable .md URL serving (default: true)\n- `enable_llms_txt`: Generate llms.txt (default: true)\n- `enable_llms_full`: Generate llms-full.txt (default: true)\n- `enable_copy_button`: Add copy button to pages (default: true)\n\n## Developer Setup\n\n### Prerequisites\n\n- Python 3.8+\n- uv (recommended) or pip\n\n### Installation for Development\n\n1. Clone the repository:\n   ```bash\n   git clone <repository-url>\n   cd mkdocs-llmstxt-md\n   ```\n\n2. Install in development mode:\n   ```bash\n   uv pip install -e .\n   # or with pip\n   pip install -e .\n   ```\n\n3. Verify installation:\n   ```bash\n   uv pip list | grep mkdocs-llmstxt-md\n   # or with pip\n   pip list | grep mkdocs-llmstxt-md\n   ```\n\n### Testing with the Test Site\n\nThe project includes a complete test site in `test-site/` to validate all plugin features:\n\n1. **Build the test site:**\n   ```bash\n   cd test-site\n   mkdocs build\n   ```\n\n2. **Serve the test site locally:**\n   ```bash\n   mkdocs serve\n   ```\n   Visit http://localhost:8000 to see the documentation\n\n3. **Validate generated files:**\n   After building, check the `test-site/site/` directory for:\n   - `llms.txt` - Index file with markdown URLs\n   - `llms-full.txt` - Complete documentation\n   - `*.md` files alongside HTML pages (e.g., `index.md`, `quickstart/index.md`)\n   - Copy button on each page (top-right corner)\n\n4. **Test markdown URL access:**\n   - Visit http://localhost:8000/index.md to see raw markdown\n   - Visit http://localhost:8000/quickstart/index.md for quickstart markdown\n   - Compare with HTML versions at http://localhost:8000/ and http://localhost:8000/quickstart/\n\n### Test Site Structure\n\nThe test site demonstrates all plugin features:\n\n```\ntest-site/\n\u251c\u2500\u2500 mkdocs.yml          # Plugin configuration example\n\u2514\u2500\u2500 docs/\n    \u251c\u2500\u2500 index.md        # Homepage with tables and code\n    \u251c\u2500\u2500 quickstart.md   # Getting started guide\n    \u251c\u2500\u2500 installation.md # Detailed setup instructions\n    \u251c\u2500\u2500 api/\n    \u2502   \u251c\u2500\u2500 overview.md # API documentation\n    \u2502   \u2514\u2500\u2500 functions.md# Function reference\n    \u2514\u2500\u2500 advanced/\n        \u2514\u2500\u2500 configuration.md # Advanced config examples\n```\n\n### Running Tests\n\nCurrently manual testing via the test site. Future versions will include automated tests.\n\n### Making Changes\n\n1. Modify code in `src/mkdocs_llmstxt_md/`\n2. Test changes: `cd test-site && mkdocs build`\n3. Validate all features work as expected\n4. Check generated files in `test-site/site/`\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "MkDocs plugin for LLM-friendly documentation with direct markdown serving",
    "version": "0.2.0",
    "project_urls": {
        "Bug Reports": "https://github.com/noklam/mkdocs-llmstxt-md/issues",
        "Homepage": "https://github.com/noklam/mkdocs-llmstxt-md",
        "Source": "https://github.com/noklam/mkdocs-llmstxt-md"
    },
    "split_keywords": [
        "mkdocs",
        " plugin",
        " llm",
        " documentation",
        " markdown",
        " ai"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "4896519526b02a4429262b0e8728765a0bda8a987d1fd4e6ac7655f26ce2a245",
                "md5": "8e076705f8d47318a9bc62e1790ebe3f",
                "sha256": "ce836a6e7bc7f7d0987c8ac0703f04b51f1d7d0096a5700b042161fbbaea5175"
            },
            "downloads": -1,
            "filename": "mkdocs_llmstxt_md-0.2.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "8e076705f8d47318a9bc62e1790ebe3f",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 7551,
            "upload_time": "2025-08-01T14:14:09",
            "upload_time_iso_8601": "2025-08-01T14:14:09.558227Z",
            "url": "https://files.pythonhosted.org/packages/48/96/519526b02a4429262b0e8728765a0bda8a987d1fd4e6ac7655f26ce2a245/mkdocs_llmstxt_md-0.2.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "be86a899ef021e44e358544b31fd3e34aa566ff876650e7dbede3e677053a492",
                "md5": "1ad57a2776f0de8839c223c8bc3263b9",
                "sha256": "c42c86fc316c5e96920b403abfffda7615fe519baca9cdb716e9ff77b703570f"
            },
            "downloads": -1,
            "filename": "mkdocs_llmstxt_md-0.2.0.tar.gz",
            "has_sig": false,
            "md5_digest": "1ad57a2776f0de8839c223c8bc3263b9",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 8780,
            "upload_time": "2025-08-01T14:14:10",
            "upload_time_iso_8601": "2025-08-01T14:14:10.926624Z",
            "url": "https://files.pythonhosted.org/packages/be/86/a899ef021e44e358544b31fd3e34aa566ff876650e7dbede3e677053a492/mkdocs_llmstxt_md-0.2.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-08-01 14:14:10",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "noklam",
    "github_project": "mkdocs-llmstxt-md",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "mkdocs-llmstxt-md"
}
        
Elapsed time: 2.77961s