# sphinxcontrib-lightbox2
Sphinx extension to add [lightbox2](https://lokeshdhakar.com/projects/lightbox2/) to each figure and image added in HTML.
---
**[Read the documentation on ReadTheDocs!](https://sphinxcontrib-lightbox2.readthedocs.io/)**
---
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
```sh
pip install sphinxcontrib-lightbox2
```
Add `sphinxcontrib.lightbox2` to the list of `extensions` in your *conf.py*:
``` python
extensions = ["sphinxcontrib.lightbox2"]
```
## Configuration
Lightbox2 offers different configuration [options](https://lokeshdhakar.com/projects/lightbox2/#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` |
<!-- README is only included in documentation until here -->
## Examples
See the examples in the [documentation](https://sphinxcontrib-lightbox2.readthedocs.io/#examples).
Raw data
{
"_id": null,
"home_page": "https://github.com/jonasehrlich/sphinxcontrib-lightbox2",
"name": "sphinxcontrib-lightbox2",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.10",
"maintainer_email": null,
"keywords": null,
"author": "Jonas Ehrlich",
"author_email": "jonas.ehrlich@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/b3/34/3b96a77ad397d9481877e8383dab1789a518426ec1844261c1ad8af42f43/sphinxcontrib_lightbox2-0.3.0.tar.gz",
"platform": null,
"description": "# sphinxcontrib-lightbox2\n\nSphinx extension to add [lightbox2](https://lokeshdhakar.com/projects/lightbox2/) to each figure and image added in HTML.\n\n---\n\n**[Read the documentation on ReadTheDocs!](https://sphinxcontrib-lightbox2.readthedocs.io/)**\n\n---\n\nUsually Sphinx themes limit their content width to a limit to improve readability. This creates a problem for large\nimages and diagrams which might be needed in technical documentation.\n\n## Installation\n\nInstall the package using\n\n```sh\npip install sphinxcontrib-lightbox2\n```\n\nAdd `sphinxcontrib.lightbox2` to the list of `extensions` in your *conf.py*:\n\n``` python\nextensions = [\"sphinxcontrib.lightbox2\"]\n```\n\n## Configuration\n\nLightbox2 offers different configuration [options](https://lokeshdhakar.com/projects/lightbox2/#options).\nThese options are exposed in `sphinxcontrib-lightbox2` through options in the *conf.py*.\n\nSee the mapping of lightbox2 options to Sphinx options\n\n| Lightbox2 Option Name | Sphinx Option Name | Default Value |\n| ----------------------|--------------------|---------------|\n| `alwaysShowNavOnTouchDevices` | `lightbox2_always_show_nav_on_touch_devices` | `False` |\n| `albumLabel` | `lightbox2_album_label` | `\"Image %1 of %2\"` |\n| `disableScrolling` | `lightbox2_disable_scrolling`| `False` |\n| `fadeDuration` | `lightbox2_fade_duration`| `600` |\n| `fitImagesInViewport` | `lightbox2_fit_images_in_viewport`| `True` |\n| `imageFadeDuration` | `lightbox2_image_fade_duration`| `600` |\n| `maxWidth` | `lightbox2_max_width`| `None` |\n| `maxHeight` | `lightbox2_max_height`| `None` |\n| `positionFromTop` | `lightbox2_position_from_top`| `50` |\n| `resizeDuration` | `lightbox2_resize_duration`| `700` |\n| `showImageNumberLabel` | `lightbox2_show_image_number_label`| `True` |\n| `wrapAround` | `lightbox2_wrap_around`| `True` |\n\n<!-- README is only included in documentation until here -->\n\n## Examples\n\nSee the examples in the [documentation](https://sphinxcontrib-lightbox2.readthedocs.io/#examples).\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Sphinx extension to add lightbox2 to each figure and image added in HTML",
"version": "0.3.0",
"project_urls": {
"Documentation": "https://sphinxcontrib-lightbox2.readthedocs.io/",
"Homepage": "https://github.com/jonasehrlich/sphinxcontrib-lightbox2",
"Repository": "https://github.com/jonasehrlich/sphinxcontrib-lightbox2"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "45728b9b28d83e9972e076bdd8130a31c80e6355549246827f925d08eb6681fa",
"md5": "5fa2a6aad5fb952c1fdb333fde026342",
"sha256": "0e3e5c670b48495c12564b66ec836b99c55735a7d7b71e9701c491238c2e22a3"
},
"downloads": -1,
"filename": "sphinxcontrib_lightbox2-0.3.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "5fa2a6aad5fb952c1fdb333fde026342",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.10",
"size": 113032,
"upload_time": "2024-05-05T17:40:05",
"upload_time_iso_8601": "2024-05-05T17:40:05.591590Z",
"url": "https://files.pythonhosted.org/packages/45/72/8b9b28d83e9972e076bdd8130a31c80e6355549246827f925d08eb6681fa/sphinxcontrib_lightbox2-0.3.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "b3343b96a77ad397d9481877e8383dab1789a518426ec1844261c1ad8af42f43",
"md5": "532ea5f37301797b54d08baf95045ee8",
"sha256": "e0acc3d1ace7aabda08e48f48abee2b9bff978caf9aca2014d4c84d7c3d10d40"
},
"downloads": -1,
"filename": "sphinxcontrib_lightbox2-0.3.0.tar.gz",
"has_sig": false,
"md5_digest": "532ea5f37301797b54d08baf95045ee8",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.10",
"size": 112189,
"upload_time": "2024-05-05T17:40:07",
"upload_time_iso_8601": "2024-05-05T17:40:07.789261Z",
"url": "https://files.pythonhosted.org/packages/b3/34/3b96a77ad397d9481877e8383dab1789a518426ec1844261c1ad8af42f43/sphinxcontrib_lightbox2-0.3.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-05-05 17:40:07",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "jonasehrlich",
"github_project": "sphinxcontrib-lightbox2",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "sphinxcontrib-lightbox2"
}