MkDocs plugin to add 'Copy to LLM' buttons to documentation
Project description
MkDocs Copy to LLM Plugin
A MkDocs plugin that adds "Copy to LLM" buttons to your documentation, making it easy to copy code blocks and entire pages in formats optimized for Large Language Models (LLMs).
Features
- Copy to LLM buttons for code blocks - Adds a button next to each code block to copy the code with context
- Copy entire page - Adds a split button at the top of each page with multiple copy options:
- Copy page content as markdown
- Copy markdown link
- Open in ChatGPT
- Open in Claude
- View raw markdown
- Smart formatting - Automatically formats content with proper context for LLM consumption
- Visual feedback - Shows success indicators and toast notifications
- Mobile responsive - Works seamlessly on all device sizes
Installation
Install the plugin using pip:
pip install mkdocs-copy-to-llm
Configuration
Add the plugin to your mkdocs.yml:
plugins:
- search
- copy-to-llm
Options
The plugin supports the following configuration options:
plugins:
- copy-to-llm:
enabled: true # Enable/disable the plugin (default: true)
code_blocks: true # Add buttons to code blocks (default: true)
page_button: true # Add button to page headers (default: true)
How It Works
The plugin automatically:
- Injects the necessary JavaScript and CSS files
- Adds copy buttons to code blocks
- Adds a split button to the main page title
- Handles all copy operations with proper formatting
Customization
The plugin uses CSS variables from your MkDocs theme. It integrates seamlessly with Material for MkDocs theme.
License
Apache License 2.0
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mkdocs_copy_to_llm-0.1.0.tar.gz.
File metadata
- Download URL: mkdocs_copy_to_llm-0.1.0.tar.gz
- Upload date:
- Size: 17.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c3285bc4f3dc2002b52cebe56ff3111b9dadb8e0d41eac3f628bab676bc9915c
|
|
| MD5 |
444328097cb44c58c9065be8689dda22
|
|
| BLAKE2b-256 |
ebcc665388dff1f2caf01711c60d6d75c704a54dc1598d94d5b968ecd56c1605
|
Provenance
The following attestation bundles were made for mkdocs_copy_to_llm-0.1.0.tar.gz:
Publisher:
release.yml on leonardocustodio/mkdocs-copy-to-llm
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mkdocs_copy_to_llm-0.1.0.tar.gz -
Subject digest:
c3285bc4f3dc2002b52cebe56ff3111b9dadb8e0d41eac3f628bab676bc9915c - Sigstore transparency entry: 310510004
- Sigstore integration time:
-
Permalink:
leonardocustodio/mkdocs-copy-to-llm@f50b6cbb557972c31652e4c4f7ce44ca95df992f -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/leonardocustodio
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@f50b6cbb557972c31652e4c4f7ce44ca95df992f -
Trigger Event:
release
-
Statement type:
File details
Details for the file mkdocs_copy_to_llm-0.1.0-py3-none-any.whl.
File metadata
- Download URL: mkdocs_copy_to_llm-0.1.0-py3-none-any.whl
- Upload date:
- Size: 15.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
94c5aad58049a1cbc2fe1e7765bbe33dc1d656db3e6e2c2330d8cd19c144e49f
|
|
| MD5 |
69bdbf68e213f1b607febb0c58a40685
|
|
| BLAKE2b-256 |
88fadd9f9cdf67c5349df11f74876df40e212c76c9524a5a65084e74600ca987
|
Provenance
The following attestation bundles were made for mkdocs_copy_to_llm-0.1.0-py3-none-any.whl:
Publisher:
release.yml on leonardocustodio/mkdocs-copy-to-llm
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mkdocs_copy_to_llm-0.1.0-py3-none-any.whl -
Subject digest:
94c5aad58049a1cbc2fe1e7765bbe33dc1d656db3e6e2c2330d8cd19c144e49f - Sigstore transparency entry: 310510016
- Sigstore integration time:
-
Permalink:
leonardocustodio/mkdocs-copy-to-llm@f50b6cbb557972c31652e4c4f7ce44ca95df992f -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/leonardocustodio
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@f50b6cbb557972c31652e4c4f7ce44ca95df992f -
Trigger Event:
release
-
Statement type: