diff --git a/articles/context_processors.py b/articles/context_processors.py
index 343d245..d51fd98 100644
--- a/articles/context_processors.py
+++ b/articles/context_processors.py
@@ -1,3 +1,5 @@
+from django.conf import settings
+
from articles.models import Article, Page
IGNORED_PATHS = [
@@ -28,7 +30,10 @@ def git_version(request):
return {}
try:
with open("/app/.version") as f:
- version = f.read().strip()[:8]
+ version = f.read().strip()
+ url = settings.BLOG["repo"]["commit_url"].format(commit_sha=version)
+ version = version[:8]
except FileNotFoundError:
version = "latest"
- return {"git_version": version}
+ url = settings.BLOG["repo"]["log"]
+ return {"git_version": version, "git_version_url": url}
diff --git a/articles/templates/articles/base.html b/articles/templates/articles/base.html
index 66339a5..9cd6376 100644
--- a/articles/templates/articles/base.html
+++ b/articles/templates/articles/base.html
@@ -50,7 +50,7 @@
CC BY-SA 4.0 International License.
Code blocks by Gabriel Augendre are licensed under the
GNU GENERAL PUBLIC LICENSE version 3.
- Currently deployed version: {{ git_version }}
+ Currently deployed version: {{ git_version }}