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 %}