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:

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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mkdocs_image_captions-0.2.2.tar.gz.
File metadata
- Download URL: mkdocs_image_captions-0.2.2.tar.gz
- Upload date:
- Size: 2.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.4.1 CPython/3.8.16 Darwin/20.4.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
10f70c801e55451886f6317d7c7bf7ce9c509dfd171a4445a1ee9b80826d9fd0
|
|
| MD5 |
d9a8c221377c7d3a6baf6b46cacdddd1
|
|
| BLAKE2b-256 |
332ee3dba8299645c26ec3d1bf0d03923cb8af8dbafa7f1df3e640ed7e937ca9
|
File details
Details for the file mkdocs_image_captions-0.2.2-py3-none-any.whl.
File metadata
- Download URL: mkdocs_image_captions-0.2.2-py3-none-any.whl
- Upload date:
- Size: 4.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.4.1 CPython/3.8.16 Darwin/20.4.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8867055382955d5cb9047c3638662e3f190487c86bc09bd2932050765e9f8aff
|
|
| MD5 |
d3b94696b568bda2382a2e5a304285d6
|
|
| BLAKE2b-256 |
69675876ddb8adb5970263321eca44df50fb136bf515d045d73ad246f5ea852d
|