{ "cells": [ { "cell_type": "markdown", "metadata": { "nbsphinx": "hidden" }, "source": [ "This notebook is part of the `nbsphinx` documentation: https://nbsphinx.readthedocs.io/." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Creating Thumbnail Galleries\n", "\n", "Inspired by [Sphinx-Gallery](https://sphinx-gallery.github.io/),\n", "you can create thumbnail galleries from a list of Jupyter notebooks\n", "(or other Sphinx source files).\n", "\n", "`nbsphinx` does *not* provide any gallery styles,\n", "but you can easily use the styles from Sphinx-Gallery\n", "by installing it:\n", "\n", " python3 -m pip install sphinx-gallery\n", "\n", "... and loading the styles in your `conf.py` with:\n", "\n", "```python\n", "extensions = [\n", " 'nbsphinx',\n", " 'sphinx_gallery.load_style',\n", " # more extensions, if needed ...\n", "]\n", "```\n", "\n", "You'll need Sphinx-Gallery version 0.6 or higher.\n", "\n", "However, you can also create your own CSS styles if you prefer\n", "(then you don't need to install Sphinx-Gallery).\n", "You can load your CSS files with\n", "[html_css_files](https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-html_css_files).\n", "\n", "You can create\n", "[Thumbnail Galleries in reST Files](../a-normal-rst-file.rst#thumbnail-galleries)\n", "and you can create galleries by adding the `\"nbsphinx-gallery\"`\n", "cell tag or metadata to notebooks,\n", "which is used just like the\n", "[\"nbsphinx-toctree\"](toctree.ipynb) cell tag/metadata.\n", "\n", "For possible options, see the [toctree](toctree.ipynb) notebook.\n", "\n", "