mirror of
https://git.sr.ht/~tsileo/microblog.pub
synced 2024-12-22 05:04:27 +00:00
Added the ability to use a custom favicon.
This commit is contained in:
parent
f50a233ce9
commit
647add2bab
1 changed files with 7 additions and 1 deletions
8
tasks.py
8
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")
|
||||
|
|
Loading…
Reference in a new issue