- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Description
Is your feature request related to a problem? Please describe.
With sphinx-apidoc, it's possible to generate a conf.py
with the -F, --full option.
There are some command-line options for controlling data that is passed to the conf.py template.
It's not possible to change the theme because it's hard-coded in the template:
html_theme = 'alabaster'
This is one of the most impactful configuration options and shouldn't require user-provided templates just to change that to something else.
Describe the solution you'd like
Use alabaster
as a default when rendering the template, but expose a command-line option (for e.g. sphinx-apidoc
) or an interactive prompt for sphinx-quickstart
to set the theme.
Describe alternatives you've considered
Expose a simpler, non-code configuration interface some other way. It seems like there's discussion about this in some other issues:
- Add static configuration (
Sphinx.toml
) #9040 - Support configuration files for sphinx-build to specify common options #9473
Additional context
Here is the template I use and how I'm invoking the command-line tools.
It's possible to use sphinx-apidoc
and sphinx-build
for a truly zero-configuration documentation-generation experience, except for being able to set the theme (in my case, sphinx_book_theme
).
Activity
picnixz commentedon Aug 10, 2023
+1 because I'm usually usiung
sphinx-rtd-theme
for deployment and I prefer its layout overalabaster
. I think it's a reasonable feature.atkinsg commentedon Jul 15, 2025
This is how I have solved this.
Copy the conf.py.jinja2 template from site-packages/quickstart to ~/.templates_sphinx/quickstart.
Modify the ~/.templates_sphinx/quickstart/conf.py.jinja2 file with the required html_theme
quickstart -p (pwd)")
-t=~/.templates_sphinx/quickstart
docs
Use documentation as normal.