summaryrefslogtreecommitdiffstats
path: root/g2h/git.py
diff options
context:
space:
mode:
authorChristoph Schlosser <christoph@linux.com>2025-09-18 22:38:36 +0200
committerChristoph Schlosser <christoph@linux.com>2025-09-18 22:38:36 +0200
commit2a592ecd951f758a62b1c4907e5da212cf1ba264 (patch)
treefe83de1e1d92f927589a07c0a02005e99d4649f2 /g2h/git.py
parent74cd345f76dd01034c804f75e7f16b42e9c0643c (diff)
downloadgit2hugo-2a592ecd951f758a62b1c4907e5da212cf1ba264.tar.gz
g2h: Set `date` frontmatter in overview page to HEAD commit
Diffstat (limited to 'g2h/git.py')
-rw-r--r--g2h/git.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/g2h/git.py b/g2h/git.py
index 1e835e7..283135c 100644
--- a/g2h/git.py
+++ b/g2h/git.py
@@ -13,6 +13,9 @@ class Git:
def get_commits(self):
return list(self.repo.iter_commits())
+ def get_head(self):
+ return self.repo.head.commit
+
def get_repo(self):
return self.repo