Skip to main content

A MkDocs plugin that converts markdown encoded images into <figure> elements.

Project description

MkDocs Img2Fig v2 Plugin

this project fix bug and add new feature in MkDocs Img2Fig plugin

This MkDocs plugin converts markdown encoded images like

![An image caption](../images/my-image.png){align="right" width="20%"}

into

<figure class="figure-image">
  <img src="../../images/my-image.png" alt="An image caption" align="left" width="20%" >
  <figcaption>An image caption</figcaption>
</figure>

center image

unfortunately, align:center is not supported. if you want to center image, add style="display:block; margin:0 auto;

for example

![An image caption](../images/my-image.png){width="20%" style="display:block; margin:0 auto;"}

Requirements

This package requires Python >=3.6 and MkDocs version 1.0 or higher.

Installation

Install the package with pip:

pip install mkdocs-img2figv2-plugin

Enable the plugin in your mkdocs.yml:

plugins:
    - search
    - img2figv2

Note: If you have no plugins entry in your config file yet, you'll likely also want to add the search plugin. MkDocs enables it by default if there is no plugins entry set, but now you have to enable it explicitly.

More information about plugins in the MkDocs documentation

Known issue

it won't work with setting use_directory_urls: false in your mkdocs.yml ( true is default )

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-img2figv2-plugin-0.0.2.tar.gz (3.6 kB view hashes)

Uploaded Source

Built Distribution

mkdocs_img2figv2_plugin-0.0.2-py3-none-any.whl (4.0 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