Generating Galleries Methods#
There are two ways to generate galleries in MyST Sphinx Gallery:
Using directives: MyST Sphinx Gallery provides three directives for generating galleries:
base-gallery,gallery, andref-gallery. You can directly use these directives to generate galleries in reStructuredText (.rst), Markdown (.md), and Jupyter Notebook (.ipynb) files.Configuring in conf.py: You can also generate gallery by specifying the examples and gallery directories in your
conf.pyfile. This method is keeping in line with Sphinx Gallery extension.
Note
Using directives is highly recommended for generating galleries
as it provides more options and flexibility. For instance, you can
add tooltip to example cards, call different directives multi-times
in a single file to generate a complex gallery. This cannnot be
done using the configuration method.