Inspired by Sphinx-Gallery, you can create thumbnail galleries from a list of Jupyter notebooks (or other Sphinx source files).
nbsphinx does not provide any gallery styles,
but you can easily use the styles from Sphinx-Gallery
by installing it:
python3 -m pip install sphinx-gallery
... and loading the styles in your
extensions = [ 'nbsphinx', 'sphinx_gallery.load_style', # more extensions, if needed ... ]
You'll need Sphinx-Gallery version 0.6 or higher.
However, you can also create your own CSS styles if you prefer (then you don't need to install Sphinx-Gallery). You can load your CSS files with html_css_files.
You can create
Thumbnail Galleries in reST Files
and you can create galleries by adding the
cell tag or metadata to notebooks,
which is used just like the
"nbsphinx-toctree" cell tag/metadata.
For possible options, see the toctree notebook.
The following cell has the
which creates a thumbnail gallery.
The first section title in that cell (if available)
is used as
"caption" (unless it's given in the metadata).
The notebooks in the following gallery describe different ways how to select which images are used as thumbnails.
This section title will be used as
This line will be ignored.
... because only the first title in this cell is used.