if err != nil {
jww.ERROR.Printf("Failed to parse date '%v' in page %s", v, p.File.Path())
}
+ case "lastmod":
+ p.Lastmod, err = cast.ToTimeE(v)
+ if err != nil {
+ jww.ERROR.Printf("Failed to parse lastmod '%v' in page %s", v, p.File.Path())
+ }
case "publishdate", "pubdate":
p.PublishDate, err = cast.ToTimeE(v)
if err != nil {
}
}
}
+
+ if p.Lastmod.IsZero() {
+ p.Lastmod = p.Date
+ }
+
return nil
}
s.setURLs(n, base)
if len(t.pages) > 0 {
n.Date = t.pages[0].Page.Date
+ n.Lastmod = t.pages[0].Page.Lastmod
}
n.Data[t.singular] = t.pages
n.Data["Singular"] = t.singular
taxonomyPagerNode.paginator = pager
if pager.TotalPages() > 0 {
taxonomyPagerNode.Date = pager.Pages()[0].Date
+ taxonomyPagerNode.Lastmod = pager.Pages()[0].Lastmod
}
pageNumber := i + 1
htmlBase := fmt.Sprintf("/%s/%s/%d", base, paginatePath, pageNumber)
}
s.setURLs(n, section)
n.Date = data[0].Page.Date
+ n.Lastmod = data[0].Page.Lastmod
n.Data["Pages"] = data.Pages()
return n
sectionPagerNode.paginator = pager
if pager.TotalPages() > 0 {
sectionPagerNode.Date = pager.Pages()[0].Date
+ sectionPagerNode.Lastmod = pager.Pages()[0].Lastmod
}
pageNumber := i + 1
htmlBase := fmt.Sprintf("/%s/%s/%d", section, paginatePath, pageNumber)
homePagerNode.paginator = pager
if pager.TotalPages() > 0 {
homePagerNode.Date = pager.Pages()[0].Date
+ homePagerNode.Lastmod = pager.Pages()[0].Lastmod
}
pageNumber := i + 1
htmlBase := fmt.Sprintf("/%s/%d", paginatePath, pageNumber)
n.Data["Pages"] = s.Pages[:high]
if len(s.Pages) > 0 {
n.Date = s.Pages[0].Date
+ n.Lastmod = s.Pages[0].Lastmod
}
rssLayouts := []string{"rss.xml", "_default/rss.xml", "_internal/_default/rss.xml"}
page := &Page{}
page.Date = s.Info.LastChange
+ page.Lastmod = s.Info.LastChange
page.Site = &s.Info
page.URL = "/"