Configuration¶
Reference for gp_sphinx.config.merge_sphinx_config() and the shared defaults
it applies.
Integration pattern¶
from gp_sphinx.config import merge_sphinx_config
conf = merge_sphinx_config(
project="my-project",
version="1.2.3",
copyright="2026, Your Name",
source_repository="https://github.com/your-org/my-project/",
)
globals().update(conf)
merge_sphinx_config() returns a flat dictionary meant to be injected into the
module namespace with globals().update(conf). That is the conventional Sphinx
integration point: Sphinx reads conf.py globals directly, and the returned
mapping already includes the coordinator’s generated setup(app) hook.
merge_sphinx_config() parameters¶
All parameters are keyword-only.
Parameter |
Type |
Default |
Description |
|---|---|---|---|
|
|
required |
Project name assigned to |
|
|
required |
Version string assigned to both |
|
|
required |
Copyright string for Sphinx metadata |
|
|
|
Seed extension list; when omitted, uses |
|
|
|
Additional extensions appended after the base list is chosen |
|
|
|
Extensions removed from the selected base list |
|
|
|
Deep-merged into |
|
|
|
GitHub repository URL used for issue links, footer icon URLs, and theme source metadata |
|
|
|
Source branch stored in |
|
|
|
Light-mode logo path merged into theme options |
|
|
|
Dark-mode logo path merged into theme options |
|
|
|
Canonical docs URL used to derive Open Graph settings |
|
|
|
Mapping assigned to |
|
|
none |
Final escape hatch for any Sphinx config key; applied after all defaults and auto-computed values |
Auto-computed values¶
From source_repository¶
Key |
Value |
|---|---|
|
|
|
repository URL |
|
repository URL for the GitHub footer icon |
From docs_url¶
Key |
Value |
|---|---|
|
|
|
|
|
|
From **overrides¶
If linkcode_resolve is present in **overrides, merge_sphinx_config()
automatically appends sphinx.ext.linkcode to extensions if it is not
already present.
Injected setup(app)¶
The returned config includes a setup(app) function from
gp_sphinx.config.setup(). It does two things:
Action |
Effect |
|---|---|
|
Registers the bundled SPA navigation script from |
|
Removes |
Always-set coordinator values¶
These are injected even though they are not exposed as DEFAULT_* constants:
Key |
Value |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Parameter interactions¶
extensions,extra_extensions, andremove_extensionsare applied in that order.theme_optionsis deep-merged, so nested theme dictionaries can be overridden without replacing the whole structure.**overridesruns last, so it can replace any default or auto-computed value.The returned
setup(app)hook survivesglobals().update(conf)intact because Sphinx reads it as a normal top-levelconf.pyfunction.