Skip to main content
Ctrl+K

PyData Theme

  • 用户指南
  • 贡献者指南
  • 示例
  • 变更日志
    • API
    • PyData Website
    • NumFocus
    • Donate to NumFocus
  • X
  • GitHub
  • PyPI
  • PyData
  • 用户指南
  • 贡献者指南
  • 示例
  • 变更日志
  • API
  • PyData Website
  • NumFocus
  • Donate to NumFocus
  • X
  • GitHub
  • PyPI
  • PyData

Section Navigation

  • pydata_sphinx_theme
    • 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
  • API Reference
  • pydata_sphinx_theme
  • pydata_sphinx_theme.logo

pydata_sphinx_theme.logo#

customize events for logo management.

we use one event to copy over custom logo images to _static and another even to link them in the html context

Functions#

copy_logo_images(app[, exception])

Copy logo image to the _static directory.

setup_logo_path(app, pagename, templatename, context, ...)

Set up relative paths to logos in our HTML templates.

Module Contents#

pydata_sphinx_theme.logo.copy_logo_images(app, exception=None)[源代码]#

Copy logo image to the _static directory.

If logo image paths are given, copy them to the _static folder. Then we can link to them directly in an html_page_context event.

参数:

app (sphinx.application.Sphinx)

返回类型:

None

pydata_sphinx_theme.logo.setup_logo_path(app, pagename, templatename, context, doctree)[源代码]#

Set up relative paths to logos in our HTML templates.

In Sphinx, the context["logo"] is a path to the html_logo image now in the output _static folder.

If logo["image_light"] and logo["image_dark"] are given, we must modify them to follow the same pattern. They have already been copied to the output folder in the update_config event.

参数:
  • app (sphinx.application.Sphinx)

  • pagename (str)

  • templatename (str)

  • context (dict)

  • doctree (docutils.nodes.Node)

返回类型:

None

上一页

pydata_sphinx_theme.edit_this_page

下一页

pydata_sphinx_theme.pygments

On this page
  • Functions
  • Module Contents
    • copy_logo_images()
    • setup_logo_path()
在 GitHub 上编辑
显示源代码

© Copyright 2019, PyData Community.

由 Sphinx 8.1.3创建。

Built with the PyData Sphinx Theme 0.16.1.