From 9b99142654b30184992aef9ee201856e4355aa23 Mon Sep 17 00:00:00 2001 From: Botond Hende Date: Sat, 2 May 2026 01:28:12 +0200 Subject: navbar implemented on blog, comics and codenames --- modules/codenames_generate.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'modules/codenames_generate.py') diff --git a/modules/codenames_generate.py b/modules/codenames_generate.py index d5aba60..3a56f3b 100644 --- a/modules/codenames_generate.py +++ b/modules/codenames_generate.py @@ -10,6 +10,11 @@ import jinja2 from ..config import Config +def init(jinja_env: jinja2.Environment, local: bool): + jinja_env.globals.update(codenames={ + "codenames_name": Config.CODENAMES_NAME, + "codenames_url": Config.CODENAMES_ROOT_URL, + }) def generate(jinja_env: jinja2.Environment, output_root_path: str, local: bool): if os.path.exists(output_root_path): @@ -17,11 +22,6 @@ def generate(jinja_env: jinja2.Environment, output_root_path: str, local: bool): os.mkdir(output_root_path) - jinja_env.globals.update(codenames={ - "codenames_name": Config.CODENAMES_NAME, - "codenames_url": Config.CODENAMES_ROOT_URL, - }) - root_template = jinja_env.get_template("codenames.html.j2") with open(os.path.join(output_root_path, "index.html"), "w") as f: f.write(root_template.render({"url" : Config.CODENAMES_ROOT_URL, "title": Config.CODENAMES_NAME})) -- cgit v1.3