add-dot-to-path.py#

Ein skurriles Dokument. Die wesentliche Aufgabe besteht darin, in Jupyterbook den lokalen Pfad . (DOT) in den Suchpfad aufzunehmen:

This will append […] and update the sys.path so the local extension can be found. https://jupyterbook.org/advanced/sphinx.html#local-sphinx-extensions

Es besteht genau aus einer einzigen Zeile:

def setup(app): ...

When sphinx-build is executed, Sphinx will attempt to import each module that is listed, and execute yourmodule.setup(app). This function is used to prepare the extension (e.g., by executing Python code), linking resources that Sphinx uses in the build process (like CSS or HTML files), and notifying Sphinx of everything the extension offers (such as directive or role definitions). https://www.sphinx-doc.org/en/master/extdev/index.html