Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/_static/ocio_b.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,19 @@
]
}

def _fix_press_logo_url(app, pagename, templatename, context, doctree):
# Sphinx 7 resolves logo_url with pathto(); sphinx-press-theme 0.9.1 then
# calls pathto(logo_url) again, which breaks the image on nested pages
# (alt text "logo"). Reset to a root-static path so Press's pathto is correct.
logo_url = context.get("logo_url")
if not logo_url or logo_url.startswith(("http://", "https://", "data:")):
return
name = logo_url.replace("\\", "/").rsplit("/", 1)[-1]
context["logo_url"] = "_static/" + name

def setup(app):
app.connect("html-page-context", _fix_press_logo_url, priority=1000)

# -- Options for LaTeX output -------------------------------------------------

latex_documents = [(
Expand Down