Compare commits

...

1 commit

Author SHA1 Message Date
Cocoa
3423747f33 Remove data/_theme.scss from git history
- Remove data/_theme.scss from git history, to prevent accidental overwrites/commits
- Add a step to the configuration wizard to create a blank file if one doesn't exist
- Move the file existence check in compile-scss to before favicon building (as it errors if the file is missing)

Fixes https://todo.sr.ht/~tsileo/microblog.pub/67
2022-11-27 11:19:12 +01:00
3 changed files with 8 additions and 5 deletions

View file

@ -1 +0,0 @@
// override vars for theming here

View file

@ -25,6 +25,10 @@ def _(event):
def main() -> None: def main() -> None:
theme_file = Path("data/_theme.scss")
if not theme_file.exists():
theme_file.write_text("// override vars for theming here")
print("Welcome to microblog.pub setup wizard\n") print("Welcome to microblog.pub setup wizard\n")
print("Generating key...") print("Generating key...")
if _KEY_PATH.exists(): if _KEY_PATH.exists():

View file

@ -46,16 +46,16 @@ def compile_scss(ctx, watch=False):
# type: (Context, bool) -> None # type: (Context, bool) -> None
from app.utils.favicon import build_favicon from app.utils.favicon import build_favicon
theme_file = Path("data/_theme.scss")
if not theme_file.exists():
theme_file.write_text("// override vars for theming here")
favicon_file = Path("data/favicon.ico") favicon_file = Path("data/favicon.ico")
if not favicon_file.exists(): if not favicon_file.exists():
build_favicon() build_favicon()
else: else:
shutil.copy2(favicon_file, "app/static/favicon.ico") 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")
if watch: if watch:
run("boussole watch", echo=True) run("boussole watch", echo=True)
else: else: