Installation & Configuration
Requirements
- Python 3.7 or higher
- MkDocs 1.0.4 or higher
Installation
Install from PyPI
Development Installation
For plugin development:
Basic Configuration
Add the plugin to your mkdocs.yml configuration:
That's it! The copy button will now appear on every page.
Configuration Options
The plugin supports the following configuration options:
button_text
- Type:
string - Default:
"Copy as Markdown" - Description: The text displayed on the copy button
button_position
- Type:
string - Default:
"top" - Options:
"top"or"bottom" - Description: Where to place the button relative to page content
Theme Compatibility
The plugin works with all MkDocs themes, including:
- Material for MkDocs
- ReadTheDocs
- Bootstrap
- Cinder
- WindMill
- Custom themes
The button styling is designed to integrate well with most theme color schemes.
Advanced Usage
Multiple Plugin Instances
You cannot configure multiple instances of the same plugin, but you can combine it with other plugins:
Plugin Order
The copy-markdown plugin should generally be placed after content-modifying plugins but before minification plugins: