MkDocs plugin that added captions to images by converting markdown encoded images into <figure> elements.
Project description
MkDocs ImageCaptions Plugin
Plugin for MkDocs that converts markdown encoded images to HTML
Example
Input MD Template:
![Informative image caption](/docs/assets/images/image.png)
Output:
<figure class="figure-image">
<img src="/docs/assets/images/image.png" alt="Informative image caption">
<figcaption>Informative image caption</figcaption>
</figure>
Plugin installation
To enable the plugin, add the following line to your mkdocs
config file mkdocs.yml
:
plugins:
- mkdocs-image-captions
Local development
Dependencies installation
The package requires Python >= 3.8 and Poetry >= 1.4.0.
Project installation
Install required packages
poetry install
Now you can activate Poetry and make your changes:
poetry shell
Run tests
Activate virtualenv:
poetry shell
Run tests:
python tests/test_plugin.py
Update package on PyPI with poetry
Build new package version
poetry build
Push to PyPI
poetry publish
Note: to push packages into PyPI you need to provide auth token:
export POETRY_PYPI_TOKEN_PYPI=<your token>
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
Close
Hashes for mkdocs_image_captions-0.2.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | b26db8f672c60fdb51dbe17e3a34d6b172c1c54159f88615ee44417b7487f1ce |
|
MD5 | afe13aa2f01fec538d2409d1bfbe13ce |
|
BLAKE2b-256 | 9f0e78cb6cdf1d0c62f20f9e9f06e0cf10cffe0db25fc6b986f4cf4beb911e90 |
Close
Hashes for mkdocs_image_captions-0.2.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8c0882ab75e9ea833c57c8884999b311f1627c00f22df481a5e040aacf531bdc |
|
MD5 | 09876ac3f3306b1fb621f3e74045f152 |
|
BLAKE2b-256 | 4bfc3f41883d26f403cc71794406fd69b77cb7ae803ab9014573371a56f7f2a4 |