A MkDocs plugin that converts markdown encoded images surrounded by two asterisks or two underscores into <figure> elements.
Project description
MkDocs Em-Img2Fig Plugin
This MkDocs plugin converts markdown encoded images surrounded by two asterisks or two underscores like
*![An image caption](images/my-image.png)*
OR
_![An image caption](images/my-image.png)_
into <figure>
notation with inline markdown for the image itself:
<figure markdown>
![Image caption](/images/my-image.png)
<figcaption>Image caption</figcaption>
</figure>
Requirements
This package requires:
- Python >=3.9 and MkDocs version 1.0 or higher.
md_in_html
extension enabled in your MkDocs configuration.
Installation
Install the package with pip:
pip install mkdocs-em-img2fig-plugin
Enable the mkdocs-em-img2fig-plugin plugin and md_in_html extension in your mkdocs.yml
:
plugins:
- search
- autolinks
- em-img2fig
markdown_extensions:
- md_in_html
Note: If you use autolinks or similar plugin declare em-img2fig after it, not before for correct precedence.
Note: If you have no plugins
entry in your config file yet, you'll likely also want to add the search
plugin. MkDocs enables it by default if there is no plugins
entry set, but now you have to enable it explicitly.
More information about plugins in the MkDocs documentation
Credits
This plugin is a fork of the https://github.com/stuebersystems/mkdocs-img2fig-plugin which does not require the two asterisks or two underscores
Project details
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
File details
Details for the file mkdocs_em_img2fig_plugin-0.3.3.tar.gz
.
File metadata
- Download URL: mkdocs_em_img2fig_plugin-0.3.3.tar.gz
- Upload date:
- Size: 4.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8780fa24d5f99b6e5c1649dff113b69c1c4eefdf40b2ccd19b6025334a3ec9af |
|
MD5 | a553ea9d22b9bb3f3c007f99e50b536c |
|
BLAKE2b-256 | c3c2b9fb25de4b8bba7c186a5bd2c6af8a3a4ac36b4e627a52c1d4765ab23dc2 |
File details
Details for the file mkdocs_em_img2fig_plugin-0.3.3-py3-none-any.whl
.
File metadata
- Download URL: mkdocs_em_img2fig_plugin-0.3.3-py3-none-any.whl
- Upload date:
- Size: 3.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d1e7c47a6dbee2256bbaade097194b3675a40bbd968331c604f39f328193ffcf |
|
MD5 | 15eca75063d82805b9319288cdfba871 |
|
BLAKE2b-256 | 12ea6c9ffb768bdf67d76c5174a917fbc7b5d0a7cf3f5a117d97ef3b0acc0d7f |