Skip to main content

MkDocs Plugin to enable pan & zoom on images and mermaid diagrams

Project description

Panzoom for MkDocs

This plugin makes use of the panzoom (LICENCE) library by Andrei Kashcha

Live Demo

Setup

pip install mkdocs-panzoom-plugin

Add it to your mkdocs.yml:

plugins:
  - search
  - panzoom

[!WARNING] Make sure to define the site_url otherwise it won't work!

Example:

site_url: https://playg0n.github.io/mkdocs-panzoom/

Usage

Examples and usage are available in the docs.

Config

Selectors

Mermaid and D2 are included by default, but you can add any arbitrary selector or exclude the default ones. To enable images add the img tag like below.

plugins:
  - panzoom:
      include_selectors:
        - .myClass # class in html
        - "#myId" # id in html
        - "img" # tag in html
      exclude_selectors:
        - ".mermaid"
        - ".d2"

Exclude Pages

plugins:
  - panzoom:
      exclude:
        - Path/to/page.md

Enable Fullscreen

[!WARNING] This is still in development!

plugins:
  - panzoom:
      full_screen: True # default False

Credits

The structure and some parts are from the enumerate-headings-plugin (LICENCE)

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_panzoom_plugin-0.1.3.tar.gz (19.3 kB view details)

Uploaded Source

Built Distribution

mkdocs_panzoom_plugin-0.1.3-py3-none-any.whl (20.0 kB view details)

Uploaded Python 3

File details

Details for the file mkdocs_panzoom_plugin-0.1.3.tar.gz.

File metadata

  • Download URL: mkdocs_panzoom_plugin-0.1.3.tar.gz
  • Upload date:
  • Size: 19.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for mkdocs_panzoom_plugin-0.1.3.tar.gz
Algorithm Hash digest
SHA256 39acf6f31e859db815bebea1bce73e2983dbc0a6a08fe6bfd779655d56502649
MD5 3c56120cb52a6f7ce51b132784a1b40b
BLAKE2b-256 3bf27e44cd7342ae154bc12b09e605d3be831b652681ff7f2cc3c4617cae5a2d

See more details on using hashes here.

File details

Details for the file mkdocs_panzoom_plugin-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for mkdocs_panzoom_plugin-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 fdc2ae2417e3c6ebe704beb73e90d215fd2a9ab05f816f5e20fb70e40dff86c8
MD5 a638ae006afd3acc5cf66f7530d667a9
BLAKE2b-256 3a7a9c58273550be49a912ab686485f7faafd67171efcc951163f7b239e9fad5

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