Example conf.py fileΒΆ
After running a sphinx-quickstart you can add the jupyter options needed for your project in a similar fashion to what is shown belows.
# --------------------------------------------
# sphinxcontrib-jupyter Configuration Settings
# --------------------------------------------
# Conversion Mode Settings
# If "all", convert codes and texts into jupyter notebook
# If "code", convert code-blocks only
jupyter_conversion_mode = "all"
# Write notebook creation metadata to the top of the notebook
jupyter_write_metadata = True
# Location for _static folder
jupyter_static_file_path = ["_static"]
# Configure Jupyter Kernels
jupyter_kernels = {
"python3": {
"kernelspec": {
"display_name": "Python",
"language": "python3",
"name": "python3"
},
"file_extension": ".py",
},
}
# Configure default language for Jupyter notebooks
# Can be changed in each notebook thanks to the ..highlight:: directive
jupyter_default_lang = "python3"
# Prepend a Welcome Message to Each Notebook
jupyter_welcome_block = "welcome.rst"
# Solutions Configuration
jupyter_drop_solutions = True
# Tests configurations
jupyter_drop_tests = True
# Add Ipython as Synonym for tests
jupyter_lang_synonyms = ["ipython"]