MkDocs Img2Fig v3 Plugin
this project fix bug and add new feature in MkDocs Img2Fig plugin
This MkDocs plugin converts markdown encoded images like
{align="right" width="20%"}
into
<figure class="figure-image">
<img src="../../images/my-image.png" alt="An image caption" align="left" width="20%" >
<figcaption>An image caption</figcaption>
</figure>
- of course, you could leave out
{align="right" width="20%"} - support attr : https://developer.mozilla.org/zh-CN/docs/Web/HTML/Element/img
center image
unfortunately, align:center is not supported. if you want to center image, add style="display:block; margin:0 auto;
for example
{width="20%" style="display:block; margin:0 auto;"}
Requirements
This package requires Python >=3.6 and MkDocs version 1.0 or higher.
Installation
Install the package with pip:
pip install mkdocs-img2figv3-plugin
Enable the plugin in your mkdocs.yml:
plugins:
- search
- img2figv3
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
This plugin also fixed the known issue in mkdocs-img2figv2-plugin. It now works with use_directory_urls: false in mkdocs.yml.
Metadata
Release files for mkdocs-img2figv3-plugin 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| mkdocs-img2figv3-plugin-0.0.2.tar.gz | 3.5 kB | Details |
Release files / mkdocs-img2figv3-plugin-0.0.2.tar.gz
| Download URL | mkdocs-img2figv3-plugin-0.0.2.tar.gz |
|---|---|
| Size | 3.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d9e2b8fccba17d0279ad320952c1269480f20be08075ea65ca29fc3116158292
|
|
BLAKE2b-256 checksum How to use checksums |
53b560b6427f8e02ed5be0966b55a85636d1f9e98c57fd77a3e0ee5bcd4fc2e2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.8
|