diff options
| author | Botond Hende <contact@wazul.moe> | 2026-05-02 01:28:12 +0200 |
|---|---|---|
| committer | Botond Hende <contact@wazul.moe> | 2026-05-02 01:40:55 +0200 |
| commit | 9b99142654b30184992aef9ee201856e4355aa23 (patch) | |
| tree | ad3f5a323bb4244a92209c4a068fa3e8d2987460 /modules/codenames_generate.py | |
| parent | 389a88088e8f5e40127d024a95c8f63318669b02 (diff) | |
navbar implemented on blog, comics and codenames
Diffstat (limited to 'modules/codenames_generate.py')
| -rw-r--r-- | modules/codenames_generate.py | 10 |
1 files changed, 5 insertions, 5 deletions
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})) |
