diff --git a/src/post.go b/src/post.go index cff60b4..f97e930 100644 --- a/src/post.go +++ b/src/post.go @@ -81,6 +81,10 @@ func (p *post) ReadableDate() string { return p.PostTime.Format("2 January 2006") } +func (p *post) ISODate() string { + return p.PostTime.Format("2006-01-02") +} + func (p *post) ISOTime() string { return p.PostTime.Format(time.RFC3339) } diff --git a/templates/index.tmpl b/templates/index.tmpl index a4ccdda..7ee2ea0 100644 --- a/templates/index.tmpl +++ b/templates/index.tmpl @@ -2,6 +2,6 @@ # {{.Title}} {{range .Posts}} -=> {{.Filename}} {{.ReadableDate}}: {{.Title}}{{end}} +=> {{.Filename}} {{.ISODate}} - {{.Title}}{{end}} => {{.URL}}/atom.xml Feed