Skip to main content

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

Examples

See the examples in the documentation.

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

sphinxcontrib_lightbox2-0.5.0.tar.gz (112.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sphinxcontrib_lightbox2-0.5.0-py3-none-any.whl (113.0 kB view details)

Uploaded Python 3

File details

Details for the file sphinxcontrib_lightbox2-0.5.0.tar.gz.

File metadata

File hashes

Hashes for sphinxcontrib_lightbox2-0.5.0.tar.gz
Algorithm Hash digest
SHA256 68a7fc911731465552b0fe304448d3ba197bf981505ff4e6c6a19da782a8b920
MD5 04a51b9dc9e0ed31c1f44f60eb94d923
BLAKE2b-256 2cdf53cd11b018796417fd5b7288fa089b67d825996e13ad351e1763b71cf849

See more details on using hashes here.

File details

Details for the file sphinxcontrib_lightbox2-0.5.0-py3-none-any.whl.

File metadata

File hashes

Hashes for sphinxcontrib_lightbox2-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4bb23b700796c2b7b02b8d2992a02c70056cb30907e1cd1c59589e5a50d63903
MD5 4bdf8cb92686002dcd7817fb4939189c
BLAKE2b-256 3894be4975a34a613fae20017907965792f9886b9fd8c80f479ca63647a1de51

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page