From a12fd0a90403378abcdef6586519d12266b46e9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lera=20Elvo=C3=A9?= Date: Mon, 30 Jun 2025 22:34:19 +0300 Subject: [PATCH] add commit to bottom nav --- app/__init__.py | 4 ++++ app/templates/base.html | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/app/__init__.py b/app/__init__.py index 548bae0..3a49a34 100644 --- a/app/__init__.py +++ b/app/__init__.py @@ -85,10 +85,14 @@ def create_app(): @app.context_processor def inject_constants(): + commit = "" + with open('.git/refs/heads/main') as f: + commit = f.read().strip() return { "InfoboxIcons": InfoboxIcons, "InfoboxHTMLClass": InfoboxHTMLClass, "InfoboxKind": InfoboxKind, + "__commit": commit, } @app.context_processor diff --git a/app/templates/base.html b/app/templates/base.html index ce2fc9b..85c95c1 100644 --- a/app/templates/base.html +++ b/app/templates/base.html @@ -21,7 +21,7 @@ {% endwith %} {% block content %}{% endblock %}