Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/arterm-sedov/mkdocs-em-img2fig-plugin
An MkDocs plugin that converts markdown encoded images surrounded by single asterisks or underscores into <figure> elements.
https://github.com/arterm-sedov/mkdocs-em-img2fig-plugin
mkdocs mkdocs-plugin mkdocs-site
Last synced: 3 months ago
JSON representation
An MkDocs plugin that converts markdown encoded images surrounded by single asterisks or underscores into <figure> elements.
- Host: GitHub
- URL: https://github.com/arterm-sedov/mkdocs-em-img2fig-plugin
- Owner: arterm-sedov
- License: mit
- Fork: true (stuebersystems/mkdocs-img2fig-plugin)
- Created: 2021-12-14T22:26:30.000Z (about 3 years ago)
- Default Branch: develop
- Last Pushed: 2024-08-28T14:58:05.000Z (4 months ago)
- Last Synced: 2024-09-18T21:44:23.314Z (3 months ago)
- Topics: mkdocs, mkdocs-plugin, mkdocs-site
- Language: Python
- Homepage: https://pypi.org/project/mkdocs-em-img2fig-plugin/
- Size: 83 KB
- Stars: 2
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# MkDocs Em-Img2Fig Plugin
This [MkDocs](https://www.mkdocs.org) plugin converts markdown encoded images surrounded by two asterisks or two underscores like
``` markdown
*![An image caption](images/my-image.png)*
```
OR
``` markdown
_![An image caption](images/my-image.png)_```
into `` notation with inline markdown for the image itself:
``` html
![Image caption](/images/my-image.png)
Image caption```
## Requirements
This package requires:
* Python >=3.9 and MkDocs version 1.0 or higher.
* `md_in_html` extension enabled in your MkDocs configuration.## Installation
Install the package with pip:
``` cmd
pip install mkdocs-em-img2fig-plugin
```Enable the mkdocs-em-img2fig-plugin plugin and md_in_html extension in your `mkdocs.yml`:
``` yaml
plugins:
- search
- autolinks
- em-img2fig
markdown_extensions:
- md_in_html
```
**Note:** If you use autolinks or similar plugin declare em-img2fig after it, not before for correct precedence.**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](https://www.mkdocs.org/user-guide/plugins/)
## Credits
This plugin is a fork of the https://github.com/stuebersystems/mkdocs-img2fig-plugin which does not require the two asterisks or two underscores