Sphinx extension to add lightbox2 to each figure and image added in HTML
Project description
sphinxcontrib-lightbox2
Sphinx extension to add lightbox2 to each figure and image added in HTML.
Read the documentation on ReadTheDocs!
Usually Sphinx themes limit their content width to a limit to improve readability. This creates a problem for large images and diagrams which might be needed in technical documentation.
Installation
Install the package using
pip install sphinxcontrib-lightbox2
Add sphinxcontrib.lightbox2
to the list of extensions
in your conf.py:
extensions = ["sphinxcontrib.lightbox2"]
Configuration
Lightbox2 offers different configuration options.
These options are exposed in sphinxcontrib-lightbox2
through options in the conf.py.
See the mapping of lightbox2 options to Sphinx options
Lightbox2 option name | Sphinx Option Name | Default Value |
---|---|---|
alwaysShowNavOnTouchDevices |
lightbox2_always_show_nav_on_touch_devices |
False |
albumLabel |
lightbox2_album_label |
"Image %1 of %2" |
disableScrolling |
lightbox2_disable_scrolling |
False |
fadeDuration |
lightbox2_fade_duration |
600 |
fitImagesInViewport |
lightbox2_fit_images_in_viewport |
True |
imageFadeDuration |
lightbox2_image_fade_duration |
600 |
maxWidth |
lightbox2_max_width |
None |
maxHeight |
lightbox2_max_height |
None |
positionFromTop |
lightbox2_position_from_top |
50 |
resizeDuration |
lightbox2_resize_duration |
700 |
showImageNumberLabel |
lightbox2_show_image_number_label |
True |
wrapAround |
lightbox2_wrap_around |
True |
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
Built Distribution
Hashes for sphinxcontrib_lightbox2-0.2.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | da3bd857d0439e92d469791b52d29de5cf4ed331b6ee95cabc3857cbfb3ff134 |
|
MD5 | 28e5b26603bdb4378469d571fc6c70dd |
|
BLAKE2b-256 | 34af5b03384ce52f24a18c7ac5358d96de368e86cf70b5297b591e2903b06b26 |
Hashes for sphinxcontrib_lightbox2-0.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a0ad679855a2bd7558c6fa652e5c8a036f968c88b18f0593f27385104a8d7a8a |
|
MD5 | 053e0646e04d2f42b7d5d66fd6751315 |
|
BLAKE2b-256 | d5e46e789e54dec9bf34308678ec09809e5864e53eed2a20a6f14c8f6c6b338d |