Skip to main content

MkDocs plugin to convert Mermaid code blocks to images.

Project description

MkDocs IZSAM Mermaid to images

This plugin processes each page's Markdown content, finds Mermaid code blocks, converts them to images using mermaid.cli, and replaces the code blocks with image references. The image format can be specified in the mkdocs.yml configuration file.

Installation

Install dependencies:

npm install -g @mermaid-js/mermaid-cli

Install the package with pip:

pip install mkdocs-izsam-mermaid-to-images

Enable the plugin in the mkdocs.yml file:

plugins:
  - search
  - mkdocs-izsam-mermaid-to-images:
      output_dir: 'mermaid_images'
      image_format: 'svg'  # or 'png'

See how to use MkDocs Plugins

Change log

[1.0.1] - 2024-09-17

Setup bug fix and README changes

Bug fix for setup entry_points section; fix for error in configuration instructions.

[1.0] - 2024-09-17

First release

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-izsam-mermaid-to-images-1.1.tar.gz (3.2 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file mkdocs-izsam-mermaid-to-images-1.1.tar.gz.

File metadata

  • Download URL: mkdocs-izsam-mermaid-to-images-1.1.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.10.0 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/1.0.0 urllib3/1.26.20 tqdm/4.64.1 importlib-metadata/4.8.3 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.5 CPython/3.6.8

File hashes

Hashes for mkdocs-izsam-mermaid-to-images-1.1.tar.gz
Algorithm Hash digest
SHA256 b0fd97c060ec8dc11c81c0e5e2a4b2281745ff359e5de2b2bb854efde532f037
MD5 46f90d27f2105f5c1ae132c46aa55c25
BLAKE2b-256 77e88f3038f73e5a4d4c69146997365df87c3939f612e993a30dde7964809db9

See more details on using hashes here.

File details

Details for the file mkdocs_izsam_mermaid_to_images-1.1-py3-none-any.whl.

File metadata

  • Download URL: mkdocs_izsam_mermaid_to_images-1.1-py3-none-any.whl
  • Upload date:
  • Size: 4.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.10.0 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/1.0.0 urllib3/1.26.20 tqdm/4.64.1 importlib-metadata/4.8.3 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.5 CPython/3.6.8

File hashes

Hashes for mkdocs_izsam_mermaid_to_images-1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9a940f44caa09f1781ad9b7887eaf2cf31e21018b335ba0697e14360ec758614
MD5 21528b56c3ca8a7f59cf492b78849275
BLAKE2b-256 d33b046dd1cce3ddc1583d7297d6442580d5b1df4f037f20225e552ca0c58fa8

See more details on using hashes here.

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