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.4.0.tar.gz (112.2 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: sphinxcontrib_lightbox2-0.4.0.tar.gz
  • Upload date:
  • Size: 112.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.10.12 Linux/6.8.0-1014-azure

File hashes

Hashes for sphinxcontrib_lightbox2-0.4.0.tar.gz
Algorithm Hash digest
SHA256 30dd43e7101a9895288ecd813dab1fd0020465f61b242a96d814a2f21d689852
MD5 cfcb5c4f00d2f67d9aae7a6cca38b0d9
BLAKE2b-256 e1ed85886d97d9f12a752664513cf09c3cb05201c213c293c530bd83828847d5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sphinxcontrib_lightbox2-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bec6f4179151b2eb380f820a03508708d985c28051897a6fbcfec39c39215503
MD5 8e2c6fb65922757be0558d3d04bdcafa
BLAKE2b-256 638fee65e736871221d08f7365abc1f3b67e3a26a8e8476c944a4fdef4f61114

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