Reputation: 18948
I typically use certain extensions such as sphinxcontrib.bibtex
with every Sphinx
documentation project, which means I need to add the extension to the conf.py
file for each project.
# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.doctest',
'sphinx.ext.intersphinx', 'sphinx.ext.todo', 'sphinx.ext.coverage',
'sphinx.ext.pngmath', 'sphinx.ext.ifconfig', 'sphinx.ext.viewcode',
'sphinxcontrib.bibtex']
Is there a simple what of including these by default in conf.py
?
Upvotes: 1
Views: 720
Reputation: 3112
You could create a module containing your default settings, and then import them into your configuration file.
However, unless you are working on the project alone, it's probably better to always include the full configuration in a project so that other people working on it know they are building it with the same settings.
Another alternative might be to create a template configuration file with those settings that you could use for new projects.
Upvotes: 2