Skip to content

Commit

Permalink
add check for BirthTime
Browse files Browse the repository at this point in the history
  • Loading branch information
jtarchie committed Oct 5, 2023
1 parent 7086fb1 commit 5c115c0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion render.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,11 @@ func (r *Render) generateFeeds(docs Docs, funcMap template.FuncMap) error {

for _, doc := range docs {
modifiedTime := doc.Timespec.ModTime().UTC()
createdTime := doc.Timespec.BirthTime().UTC()
createdTime := modifiedTime

if doc.Timespec.HasBirthTime() {
createdTime = doc.Timespec.BirthTime().UTC()
}

err := sitemap.Add(&smg.SitemapLoc{
Loc: doc.RelativePath(),
Expand Down

0 comments on commit 5c115c0

Please sign in to comment.