Skip to main content

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

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>

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.2.2.tar.gz (2.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mkdocs_image_captions-0.2.2-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

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

Hashes for mkdocs_image_captions-0.2.2.tar.gz
Algorithm Hash digest
SHA256 10f70c801e55451886f6317d7c7bf7ce9c509dfd171a4445a1ee9b80826d9fd0
MD5 d9a8c221377c7d3a6baf6b46cacdddd1
BLAKE2b-256 332ee3dba8299645c26ec3d1bf0d03923cb8af8dbafa7f1df3e640ed7e937ca9

See more details on using hashes here.

File details

Details for the file mkdocs_image_captions-0.2.2-py3-none-any.whl.

File metadata

File hashes

Hashes for mkdocs_image_captions-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 8867055382955d5cb9047c3638662e3f190487c86bc09bd2932050765e9f8aff
MD5 d3b94696b568bda2382a2e5a304285d6
BLAKE2b-256 69675876ddb8adb5970263321eca44df50fb136bf515d045d73ad246f5ea852d

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.2.2 This release

2 files

0.2.1

2 files

0.2.0

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page