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.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | b4f1ffb7bef243a4f99b7aac1dd5c28023007e2db7d8a706285ef59d6696c92c |
|
MD5 | 981dd878a82b73f919e16d42759bd46a |
|
BLAKE2b-256 | c0ce697443ce026ac9b0d9e5ab27298eef73f78108b8c6790865c278ef406cf9 |
Close
Hashes for mkdocs_image_captions-0.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 84585a8a3fdd3cae2b97228933560fcef1935fcf369b8a39eeb0a5a7a9e554e2 |
|
MD5 | dd997a9c93f2637717b5bc1c7ad5d59b |
|
BLAKE2b-256 | 574d1ec0a8df552e995df04c0799e376b86dc8d3698184d7308f4019fd3af96f |