This plugin enhances your MkDocs site with Bootstrap elements, allowing you to easily add accordions, modals, and cards using simple Markdown syntax.
- Accordion support
- Modal support
- Card support
- Easy-to-use Markdown syntax
- Customizable styles
Install the plugin using pip:
pip install mkdocs-bootstrap-elements-plugin
- Add the plugin to your
mkdocs.yml
:
plugins:
- search
- bootstrap_elements
- Use the custom syntax in your Markdown files:
:::accordion Accordion Title
Accordion content goes here.
:::
:::modal Modal Title
Modal content goes here.
:::
:::card Card Title
Card content goes here.
:::
You can customize the appearance of the Bootstrap elements by overriding the default CSS. Create a custom CSS file or use the included ones and add it to your mkdocs.yml
.
The bootstrap_elements.js file will need to be copied into your mkdocs directory for the accordions to work properly.
extra_css:
- css/bootstrap_elements.css
extra_javascript:
- js/bootstrap_elements.js