{{- define "xml/sitemap" }} {{ .Config.URL }} {{- range .Posts -}} {{ if and (not (and .FM.ParsedFlags.ExternalPost .FM.URL)) (or (not .FM.ParsedFlags.HidePost) .FM.ParsedFlags.ShowInRSSAndSitemap) }} {{- $targetDate := "" -}} {{ if .FM.Updated -}} {{ $targetDate = "2006-01-02T15:04:05.000Z" | .FM.TimeUpdated.Format -}} {{ else if .FM.Date -}} {{ $targetDate = "2006-01-02T15:04:05.000Z" | .FM.TimeDate.Format -}} {{- end }} {{ print $.Config.URL .FM.URI }} {{ if $targetDate }}{{ $targetDate }}{{ end }} 0.5 {{- end }} {{- end }} {{- end }}