Skip to content

Commit

Permalink
MNT: more flexible static (#1221)
Browse files Browse the repository at this point in the history
  • Loading branch information
jklymak authored Mar 6, 2023
1 parent 3bf5e06 commit 26a261d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/pydata_sphinx_theme/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1168,6 +1168,10 @@ def copy_logo_images(app: Sphinx, exception=None) -> None:
path_image = logo.get(f"image_{kind}")
if not path_image or isurl(path_image):
continue
if (staticdir / Path(path_image).name).exists():
# file already exists in static dir e.g. because a theme has
# bundled the logo and installed it there
continue
if not (Path(app.srcdir) / path_image).exists():
logger.warning(f"Path to {kind} image logo does not exist: {path_image}")
# Ensure templates cannot be passed for logo path to avoid security vulnerability
Expand Down

0 comments on commit 26a261d

Please sign in to comment.