Skip to main content
`Ctrl`+`K`

# pydata_sphinx_theme

Bootstrap-based sphinx theme from the PyData community.

## Submodules

- pydata_sphinx_theme.edit_this_page
- pydata_sphinx_theme.logo
- pydata_sphinx_theme.pygments
- pydata_sphinx_theme.short_link
- pydata_sphinx_theme.toctree
- pydata_sphinx_theme.translator
- pydata_sphinx_theme.utils

## Attributes

`__version__` |

## Functions

`_fix_canonical_url`(app, pagename, templatename, ...) | Fix the canonical URL when using the dirhtml builder.
`add_shorten_xform`(app) | Add the link shortening transform.
`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)

  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:

    - app (sphinx.application.Sphinx)

    - pagename (str)

    - templatename (str)

    - context (dict)

  Return type:

    None

pydata_sphinx_theme.add_shorten_xform(app)

  Add the link shortening transform.

  Parameters:

    app (sphinx.application.Sphinx)

  Return type:

    None

pydata_sphinx_theme.setup(app)

  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)

  Update template names and assets for page build.

  Parameters:

    - app (sphinx.application.Sphinx)

    - pagename (str)

    - templatename (str)

  Return type:

    None

pydata_sphinx_theme.update_config(app)

  Update config with new default values and handle deprecated keys.

pydata_sphinx_theme.__version__ = '0.17.1'