From 647add2bab81b185551b8b9c02d963d03a5e5773 Mon Sep 17 00:00:00 2001 From: Josh Washburne Date: Mon, 17 Oct 2022 14:29:07 +0000 Subject: [PATCH] Added the ability to use a custom favicon. --- tasks.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tasks.py b/tasks.py index c8c5f30..2dd57bf 100644 --- a/tasks.py +++ b/tasks.py @@ -1,5 +1,6 @@ import asyncio import io +import shutil import tarfile from contextlib import contextmanager from pathlib import Path @@ -45,7 +46,12 @@ def compile_scss(ctx, watch=False): # type: (Context, bool) -> None from app.utils.favicon import build_favicon - build_favicon() + favicon_file = Path("data/favicon.ico") + if not favicon_file.exists(): + build_favicon() + else: + shutil.copy2(favicon_file, "app/static/favicon.ico") + theme_file = Path("data/_theme.scss") if not theme_file.exists(): theme_file.write_text("// override vars for theming here")