summaryrefslogtreecommitdiffstats
path: root/g2h/overview_page.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/overview_page.py
parent74cd345f76dd01034c804f75e7f16b42e9c0643c (diff)
downloadgit2hugo-2a592ecd951f758a62b1c4907e5da212cf1ba264.tar.gz
g2h: Set `date` frontmatter in overview page to HEAD commit
Diffstat (limited to 'g2h/overview_page.py')
-rw-r--r--g2h/overview_page.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/g2h/overview_page.py b/g2h/overview_page.py
index 76de8cc..0363494 100644
--- a/g2h/overview_page.py
+++ b/g2h/overview_page.py
@@ -1,15 +1,17 @@
from .page import Page
class OverviewPage(Page):
- def __init__(self, out_dir, name, branches, tags, content_subdir):
+ def __init__(self, out_dir, name, branches, tags, content_subdir, latest_commit):
super(OverviewPage, self).__init__('overview.md', out_dir, '_index.md', name, content_subdir)
self.branches = branches
self.tags = tags
+ self.latest_commit = latest_commit
def context(self):
return {
'branches': self.branches,
'content_subdir': self.content_subdir,
+ 'latest_commit_date': self.latest_commit.committed_datetime,
'tags': self.tags,
'title': self.name
}