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.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 10f70c801e55451886f6317d7c7bf7ce9c509dfd171a4445a1ee9b80826d9fd0 |
|
MD5 | d9a8c221377c7d3a6baf6b46cacdddd1 |
|
BLAKE2b-256 | 332ee3dba8299645c26ec3d1bf0d03923cb8af8dbafa7f1df3e640ed7e937ca9 |
Close
Hashes for mkdocs_image_captions-0.2.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8867055382955d5cb9047c3638662e3f190487c86bc09bd2932050765e9f8aff |
|
MD5 | d3b94696b568bda2382a2e5a304285d6 |
|
BLAKE2b-256 | 69675876ddb8adb5970263321eca44df50fb136bf515d045d73ad246f5ea852d |