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.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8ae7c04abb36155bb890749d476e687bb5718a1b412948a8555b34462df12147 |
|
MD5 | 5138743a210ce8d7a46a6852d2d9ef44 |
|
BLAKE2b-256 | 7fd296cf18d4eb67f9ebdeeb8061d735f875daf49382ff1837f9cdb813ad4c11 |
Close
Hashes for mkdocs_image_captions-0.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d4e623b49c9b281e81468e9fb4bd5fd37e145a0989dc52fe8f530297f6e9e815 |
|
MD5 | 8783b0b83f8ece766326044bfdce55fc |
|
BLAKE2b-256 | c15d602d7e9f566aa92968dac0d7aa698b5fc8d1f7f766a96f2cc41bd69d1ee3 |