Skip to content

Commit 11381c5

Browse files
committed
[docs] Add favicon for website and docs
1 parent cf9c803 commit 11381c5

File tree

5 files changed

+11
-0
lines changed

5 files changed

+11
-0
lines changed

dist/generate_assets.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,11 @@ class LogoOutput(NamedTuple):
4848

4949
# Heights match the natural SVG aspect ratio (1024x480).
5050
# _small outputs use the -bg variant (background included).
51+
FAVICON_OUTPUTS: list[Path] = [
52+
REPO_DIR / "docs" / "_static" / "favicon.ico",
53+
REPO_DIR / "website" / "pages" / "img" / "favicon.ico",
54+
]
55+
5156
LOGO_OUTPUTS: list[LogoOutput] = [
5257
LogoOutput(REPO_DIR / "docs" / "_static" / "pyscenedetect_logo.png", 900, 422, LOGO_SVG),
5358
LogoOutput(REPO_DIR / "docs" / "_static" / "pyscenedetect_logo_small.png", 300, 141, LOGO_BG_SVG),
@@ -165,6 +170,10 @@ def main():
165170
images[-1].save(ICO_PATH, format="ICO", append_images=images[:-1])
166171

167172
print(f"Output ICO: {ICO_PATH}")
173+
print("Copying favicons...")
174+
for dest in FAVICON_OUTPUTS:
175+
shutil.copy2(ICO_PATH, dest)
176+
print(f" {dest.relative_to(REPO_DIR)}")
168177
render_logos(inkscape)
169178

170179

docs/_static/favicon.ico

27.2 KB
Binary file not shown.

docs/conf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@
7878
# so a file named "default.css" will overwrite the builtin "default.css".
7979
html_static_path = ["_static"]
8080
html_css_files = ["pyscenedetect.css"]
81+
html_favicon = "favicon.ico"
8182

8283
# Custom sidebar templates, must be a dictionary that maps document names
8384
# to template names.

website/mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ copyright: 'Copyright © 2014-2024 Brandon Castellano. All rights reserved.
1212
theme:
1313
name: readthedocs
1414
logo: img/pyscenedetect_logo_small.png
15+
favicon: img/favicon.ico
1516
custom_dir: overrides
1617
# TODO: deprecated option for this theme
1718
google_analytics: ['UA-72551323-1', 'auto']

website/pages/img/favicon.ico

27.2 KB
Binary file not shown.

0 commit comments

Comments
 (0)