This commit is contained in:
SG
2025-06-08 20:18:18 +03:00
parent 09621b73c3
commit 3348df26e5
3 changed files with 23 additions and 14 deletions

View File

@@ -25,7 +25,7 @@ header_image = Config.HEADER_IMAGE or '/static/header.jpg'
def build_site():
def build_site_old():
logger.info(f"Building the '{Config.MAIN_PAGE_TITLE}' site.")
# Recreate the output dir if needed
@@ -73,14 +73,13 @@ def build_site():
def main():
args = argparser.parse_args()
if args.content:
content = args.content or args.edit
create_content(content)
edit_content(content)
if args.build:
build_site()
if args.init:
init_site()
match args.command:
case "build":
build_site()
case "init":
init_site()
case "new" | "create" | "edit":
edit_content(args.filename)
if __name__ == '__main__':
main()