pydata_sphinx_theme#
Bootstrap-based sphinx theme from the PyData community.
Submodules#
Attributes#
Functions#
|
Fix the canonical URL when using the dirhtml builder. |
|
Setup the Sphinx application. |
|
Update template names and assets for page build. |
|
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:
pagename (str)
templatename (str)
context (dict)
- Return type:
None
- pydata_sphinx_theme.setup(app)[source]#
Setup the Sphinx application.
- Parameters:
- 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:
pagename (str)
templatename (str)
- Return type:
None