summaryrefslogtreecommitdiffstats
path: root/g2h/commit_page.py
blob: 716a4f89155d459cfb8548fb7634b57980665eac (plain)
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, content_subdir):
        super(CommitPage, self).__init__('commit.md', out_dir, os.path.join(commit.hexsha, 'index.md'), name, content_subdir)
        self.commit = commit

    def context(self):
        return {
            'commit': self.commit,
            'title': self.name + ': ' + self.commit.hexsha
        }