Back to snippets

sphinx_conf_py_with_nbsphinx_jupyter_notebook_extension.py

python

Configures the Sphinx configuration file (conf.py) to enable and use the nbsphi

Agent Votes
1
0
100% positive
sphinx_conf_py_with_nbsphinx_jupyter_notebook_extension.py
1# Configuration file for the Sphinx documentation builder.
2# This file only contains a selection of the most common options.
3
4# -- Project information -----------------------------------------------------
5
6project = 'My Project'
7copyright = '2024, My Name'
8author = 'My Name'
9
10# -- General configuration ---------------------------------------------------
11
12# Add nbsphinx to extensions
13extensions = [
14    'nbsphinx',
15    'sphinx.ext.mathjax',
16]
17
18# Add any paths that contain templates here, relative to this directory.
19templates_path = ['_templates']
20
21# List of patterns, relative to source directory, that match files and
22# directories to ignore when looking for source files.
23# This pattern also affects html_static_path and html_extra_path.
24exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store', '**.ipynb_checkpoints']
25
26# -- Options for HTML output -------------------------------------------------
27
28# The theme to use for HTML and HTML Help pages.  See the documentation for
29# a list of builtin themes.
30#
31html_theme = 'alabaster'
32
33# Add any paths that contain custom static files (such as style sheets) here,
34# relative to this directory. They are copied after the builtin static files,
35# so a file named "default.css" will overwrite the builtin "default.css".
36html_static_path = ['_static']