Skip to content

AnotherGroupChat/mkdocs-img2figv3-plugin

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MkDocs Img2Fig v3 Plugin

A simple regex is not going to cut it. Extends 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>

Requirements

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

Installation

Install the package with pip:

pip install mkdocs-img2figv3-plugin @ git+https://github.com/AnotherGroupChat/mkdocs-img2figv3-plugin
# TODO: pip install mkdocs-img2figv3-plugin

Enable the plugin in your mkdocs.yml:

plugins:
    - search
    - img2figv3

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 )

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Python 100.0%