pydata_sphinx_theme#

Bootstrap-based sphinx theme from the PyData community.

Submodules#

Attributes#

Functions#

_fix_canonical_url(app, pagename, templatename, ...)

Fix the canonical URL when using the dirhtml builder.

setup(app)

Setup the Sphinx application.

update_and_remove_templates(app, pagename, ...)

Update template names and assets for page build.

update_config(app)

Update config with new default values and handle deprecated keys.

Package Contents#

pydata_sphinx_theme._fix_canonical_url(app, pagename, templatename, context, doctree)[source]#

Fix the canonical URL when using the dirhtml builder.

Sphinx builds a canonical URL if html_baseurl config is set. However, it builds a URL ending with “.html” when using the dirhtml builder, which is incorrect. Detect this and generate the correct URL for each page.

Workaround for sphinx-doc/sphinx#9730; can be removed when that is fixed, released, and available in our minimum supported Sphinx version.

Parameters:
Return type:

None

pydata_sphinx_theme.setup(app)[source]#

Setup the Sphinx application.

Parameters:

app (sphinx.application.Sphinx)

Return type:

Dict[str, str]

pydata_sphinx_theme.update_and_remove_templates(app, pagename, templatename, context, doctree)[source]#

Update template names and assets for page build.

Parameters:
Return type:

None

pydata_sphinx_theme.update_config(app)[source]#

Update config with new default values and handle deprecated keys.

pydata_sphinx_theme.__version__ = '0.15.4dev0'[source]#