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 build
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.1.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6dd2f7303d4fd7ad819ddc78b353d4edca8460f12a98e1da499fc0b9fff77397 |
|
MD5 | fd13d530fc7c41b3a1d48b16373ee102 |
|
BLAKE2b-256 | d5ea26aa03fe0169678801c57958cf43fb1a94e7c4a9f451b22407a53e7314ae |
Close
Hashes for mkdocs_image_captions-0.1.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fa5bbec2829e837173bc3a0d9d05e3a9b4322d01e876c669ec045b8d76a277e4 |
|
MD5 | fbc5d00a0842d962933851cb5da29660 |
|
BLAKE2b-256 | 23ae857597a6e3a17fd6026709ec4b46fcc8a519fe9a02ffe3e40cad1c26af84 |