From 0b3f38b3786c1b738165778d210453e1c2bfe309 Mon Sep 17 00:00:00 2001 From: Christoph Schlosser Date: Sun, 24 Aug 2025 17:37:43 +0200 Subject: g2h: Add commit page --- g2h/commit_page.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 g2h/commit_page.py (limited to 'g2h/commit_page.py') diff --git a/g2h/commit_page.py b/g2h/commit_page.py new file mode 100644 index 0000000..325df85 --- /dev/null +++ b/g2h/commit_page.py @@ -0,0 +1,14 @@ +import os + +from .page import Page + +class CommitPage(Page): + def __init__(self, out_dir, name, commit): + super(CommitPage, self).__init__('commit.md', out_dir, os.path.join(commit.hexsha, 'index.md'), name) + self.commit = commit + + def context(self): + return { + 'commit': self.commit, + 'title': self.name + ': ' + self.commit.hexsha + } -- cgit v1.2.3