diff options
Diffstat (limited to 'g2h/commit_page.py')
| -rw-r--r-- | g2h/commit_page.py | 14 |
1 files changed, 14 insertions, 0 deletions
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 + } |