1 2 3 4 5 6 7 8 9 10 11 12 13 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 }