Skip to main content

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

element with captions.

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

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

mkdocs_image_captions-0.1.1.tar.gz (2.4 kB view hashes)

Uploaded Source

Built Distribution

mkdocs_image_captions-0.1.1-py3-none-any.whl (3.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page