This notebook is part of the nbsphinx
documentation: https://nbsphinx.readthedocs.io/.
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 --user
... and loading the styles in your conf.py
with:
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 "nbsphinx-gallery"
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 "nbsphinx-gallery"
tag,
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 :caption:
:
This line will be ignored.
... because only the first title in this cell is used.