support for futre/draft summary info output

This commit is contained in:
Joel Scoble
2014-08-20 10:09:35 -05:00
committed by spf13
parent 946ad9c2c3
commit c750a95e22
2 changed files with 62 additions and 1 deletions

View File

@@ -304,6 +304,17 @@ func (page *Page) ShouldBuild() bool {
return false
}
func (page *Page) IsDraft() bool {
return page.Draft
}
func (page *Page) IsFuture() bool {
if page.PublishDate.Before(time.Now()) {
return false
}
return true
}
func (p *Page) Permalink() (string, error) {
link, err := p.permalink()
if err != nil {