API Reference

Config reference

Generated from app.add_config_value() registrations in sphinx_gp_sitemap/__init__.py.

site_url
config none
config none
site_url

Site base URL prepended to every sitemap entry. Auto-derived from docs_url (trailing-slash normalized) under gp-sphinx; falls back to html_baseurl when unset. If both are unset the build is skipped silently at INFO level.

Type:

None | str

Default:

None

Registered by:

sphinx_gp_sitemap.setup()

sitemap_url_scheme
config none
config none
sitemap_url_scheme

Per-URL composition template formatted with lang (language/ or empty), version (version/ or empty), and link (the page’s relative URL). Auto-set to flat {link} under gp-sphinx; multilingual or version-pinned hosts can pass {lang}{version}{link} via **overrides.

Type:

str

Default:

'{lang}{version}{link}'

Registered by:

sphinx_gp_sitemap.setup()

sitemap_locales
config none
config none
sitemap_locales

Locales emitted as <xhtml:link rel="alternate" hreflang=...> siblings on every URL. Empty list auto-detects sub-directories of every locale_dirs entry; [None] explicitly suppresses hreflang alternates. Underscores in locale codes become hyphens for IANA compatibility.

Type:

None | list

Default:

[]

Registered by:

sphinx_gp_sitemap.setup()

sitemap_filename
config none
config none
sitemap_filename

Output filename written under the build’s outdir.

Type:

str

Default:

'sitemap.xml'

Registered by:

sphinx_gp_sitemap.setup()

sitemap_excludes
config none
config none
sitemap_excludes

fnmatch patterns matched against each page’s relative URL (after the builder applies its suffix). Matched pages are dropped from the sitemap; everything else is included.

Type:

list

Default:

[]

Registered by:

sphinx_gp_sitemap.setup()

sitemap_show_lastmod
config none
config none
sitemap_show_lastmod

When True, lazy-loads sphinx-last-updated-by-git and emits a <lastmod> element per page from the source file’s latest commit timestamp. If the supporting extension is not installed, gp-sitemap warns once and silently disables the flag.

Type:

bool

Default:

False

Registered by:

sphinx_gp_sitemap.setup()

sitemap_indent
config none
config none
sitemap_indent

XML indent width in spaces. 0 minifies the output; any positive value pretty-prints via ElementTree.indent.

Type:

int

Default:

0

Registered by:

sphinx_gp_sitemap.setup()

html_baseurl
config none
config none
html_baseurl

Sphinx core’s canonical HTML base URL — re-registered defensively here to serve as the site_url fallback on Sphinx versions that ship without it.

Type:

None | str

Default:

None

Registered by:

sphinx_gp_sitemap.setup()