MkDocs plugin supports image lightbox with GLightbox.
Maintained. Last release 5 weeks ago, commits in 2 of the last 26 weeks. Weaker on commit activity and issue handling.
pip install mkdocs-glightboxMkDocs GLightbox
A MkDocs plugin supports image lightbox with GLightbox.
GLightbox is a pure javascript lightbox library with mobile support.
Live demo with Material for MkDocs.
Dependency
- GLightbox javascript file and CSS file
- GLightbox==3.3.1
- selectolax process HTML
- selectolax>=0.3.29
Usage
-
Install the plugin from PyPI
pip install mkdocs-glightbox -
Add
glightboxplugin to your mkdocs.yml plugins sections:plugins: - glightbox -
All images will be added to the lightbox effect automatically, except images in an anchor tag and emoji images from pymdown-extensions.
-
You may customize the plugin by passing options in mkdocs.yml:
plugins: - glightbox: touchNavigation: true loop: false effect: zoom slide_effect: slide width: 100% height: auto zoomable: true draggable: true skip_classes: - custom-skip-class-name auto_themed: false auto_caption: false caption_position: bottom background: white shadow: true manual: falseOption Default Description touchNavigation true Enable or disable the touch navigation (swipe).