Getting Started

Install

Install the library with pip:

pip install sphinx-carousel
pip install git+https://github.com/Robpol86/sphinx-carousel@main

Enable

Add sphinx_carousel.carousel to your extensions list in your conf.py file:

extensions = [
     "sphinx_carousel.carousel",
]

Configuration

The following optional configuration settings are available for use in your conf.py file:

Default: True

Include Bootstrap CSS and javascript files on pages that contain carousels via <link> and <script> HTML tags.

If you’re using a Sphinx theme or another Sphinx extension that includes Bootstrap you can set this to False to avoid multiple Bootstrap files from being loaded. You’ll also want to look at the carousel_bootstrap_prefix option.

Default: scbs-

Prefix all CSS classes with this string.

If you set carousel_bootstrap_add_css_js to False you’ll want to set this to an empty string.

Default: False

Set :show_buttons_on_top: on all carousels by default. Can be disabled on a per-usage basis with :no_buttons_on_top:.

Default: False

Set :show_captions_below: on all carousels by default. Can be disabled on a per-usage basis with :no_captions_below:.

Default: False

Set :show_controls: on all carousels by default. Can be disabled on a per-usage basis with :no_controls:.

Default: False

Set :show_dark: on all carousels by default. Can be disabled on a per-usage basis with :no_dark:.

Default: False

Set :show_fade: on all carousels by default. Can be disabled on a per-usage basis with :no_fade:.

Default: False

Set :show_indicators: on all carousels by default. Can be disabled on a per-usage basis with :no_indicators:.

Default: False

Set :show_shadows: on all carousels by default. Can be disabled on a per-usage basis with :no_shadows:.