Skip to content

Commit 26a261d

Browse files
authored
MNT: more flexible static (#1221)
1 parent 3bf5e06 commit 26a261d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/pydata_sphinx_theme/__init__.py

+4
Original file line numberDiff line numberDiff line change
@@ -1168,6 +1168,10 @@ def copy_logo_images(app: Sphinx, exception=None) -> None:
11681168
path_image = logo.get(f"image_{kind}")
11691169
if not path_image or isurl(path_image):
11701170
continue
1171+
if (staticdir / Path(path_image).name).exists():
1172+
# file already exists in static dir e.g. because a theme has
1173+
# bundled the logo and installed it there
1174+
continue
11711175
if not (Path(app.srcdir) / path_image).exists():
11721176
logger.warning(f"Path to {kind} image logo does not exist: {path_image}")
11731177
# Ensure templates cannot be passed for logo path to avoid security vulnerability

0 commit comments

Comments
 (0)