wrap dates in <time> tags with datetime attribute
1 file changed, 7 insertions(+), 1 deletion(-)
changed files
M templates/commit.go → templates/commit.go
@@ -2,6 +2,7 @@ package templates import ( "fmt" + "time" "github.com/bluekeyes/go-gitdiff/gitdiff" "github.com/go-git/go-git/v5/plumbing/object"@@ -115,7 +116,12 @@ Href(fmt.Sprintf("mailto:%s", author.Email)), Class("commit-email"), g.Text(author.Email), ), - Div(g.Text(author.When.Format("Mon, 02 Jan 2006 15:04:05 -0700"))), + Div( + Time( + DateTime(author.When.Format(time.RFC3339)), + g.Text(author.When.Format("Mon, 02 Jan 2006 15:04:05 -0700")), + ), + ), ) }