Security News
PyPI’s New Archival Feature Closes a Major Security Gap
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
A Sphinx extension that builds galleries of examples from any set of myst-style markdown/notebook or rst files.
MyST Sphinx Gallery is a Sphinx extension that allows you to build
galleries from jupyter notebooks (.ipynb
), markdown (.md
) or
reStructuredText (.rst
) files.
This extension is functionally similar to the Sphinx-Gallery extension, but aim to provide a simple and efficient way to create galleries written in a variety of file formats.
directives
to generate
galleries, as simple as adding toctree
.MyST
Ecosystem, including MyST-parser and MyST-NB, to render markdown or jupyter notebooks in Sphinx documentation.The detailed documentation is available at: https://myst-sphinx-gallery.readthedocs.io/en/latest/
[!NOTE] The quick start guide here is a brief introduction to the MyST Sphinx Gallery extension. More detailed Quick Start guide is available at: Quick Start.
MyST Sphinx Gallery is a Python package, and requires Python >= 3.8
. You can install the latest release using pip
from the PyPI:
pip install myst_sphinx_gallery
or using conda
/ mamba
from the conda-forge channel:
conda install -c conda-forge myst-sphinx-gallery
mamba install -c conda-forge myst-sphinx-gallery
After installation, you can enable the extension in Sphinx conf.py
file:
extensions = [
..., # other extensions
"myst_sphinx_gallery",
]
[!IMPORTANT] MyST Sphinx Gallery only helps you to generate the gallery. You need to enable the MyST parsers to render the markdown or jupyter notebook files by yourself.
For instance, to enable the MyST-NB, you can add the following code to the
conf.py
file:
extensions = [ ..., "myst_nb", ] source_suffix = { ".rst": "restructuredtext", ".md": "myst-nb", ".myst": "myst-nb", }
For more information, please refer to the documentation of MyST and MyST-NB.
MyST Sphinx Gallery has two main configuration variables that can be set in
your conf.py
file.
myst_sphinx_gallery_config
: global configuration for all examples
using gallery directives or used to generate galleries.myst_sphinx_gallery_files_config
: configuration for individual files
to override the global configuration for those files.[!TIP] Those two variables are optional and can be omitted if you don't need to customize the behavior of MyST-Sphinx-Gallery.
More details about the configuration variables can be found in the Configuration Variables section.
There are two ways to generate galleries in MyST Sphinx Gallery:
base-gallery
, gallery
, and ref-gallery
. You can directly use these directives to generate galleries in reStructuredText (.rst
), Markdown (.md
), and Jupyter Notebook (.ipynb
) files.conf.py
file. 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 cannot be done using the configuration method.
You can refer to the Generating Galleries Methods section for more details.
More details can be found in the Thumbnail Strategies.
You can customize the layout and thumbnail behaviors for the gallery using the MyST Sphinx Gallery extension. For more details, please refer to the section Customizing Style of Thumbnail and Card .
FAQs
A Sphinx extension that builds galleries of examples from any set of myst-style markdown/notebook or rst files.
We found that myst-sphinx-gallery demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
Research
Security News
Malicious npm package postcss-optimizer delivers BeaverTail malware, targeting developer systems; similarities to past campaigns suggest a North Korean connection.
Security News
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.