Move project-specific extensions into a dedicated directory / package #16
Labels
area/repository
Affects the repository structure
area/sphinx
Related to sphinx
lang/python
type/improvement
Improvement of an existing feature
Milestone
Currently,
Sphinx
's configuration fileconf.py
acts like one of the project's extensions.While this works reasonably well for small use-cases (see #5), it is not the desired result.
To Do:
Sphinx
's most basic tutorial places the (custom) extension in a folder_ext
in the source directory.From my understanding, the
_ext
directory may be placed anywhere. It has to be added to Python'sPATH
. See the section on extendingsys.path
.Namespacing might be an issue, so make sure that the project's dedicated extensions don't conflict with other existing extensions (or other packages).
Steps
[REPO_ROOT]/extensions/mischback
[REPO_ROOT]/extensions
to Python pathconf.py
:[REPO_ROOT]/extensions/mischback/sphinx_jinja2_debug.py
:conf.py
:setup()
function return the (desired) dictionary (see dry-coding here)The text was updated successfully, but these errors were encountered: