diff --git a/layouts/sitemap.xml b/layouts/sitemap.xml new file mode 100644 index 0000000..f931c44 --- /dev/null +++ b/layouts/sitemap.xml @@ -0,0 +1,47 @@ + + {{- range (where .Data.Pages "Section" "!=" "gallery") -}} + + + {{- .Permalink -}} + + {{- if not .Lastmod.IsZero -}} + + {{- .Lastmod.Format "2006-01-02T15:04:05-07:00" -}} + + {{- end -}} + {{- with .Sitemap.ChangeFreq -}} + + {{- . -}} + + {{- end -}} + + {{- if ge .Sitemap.Priority 0.0 -}} + {{- $weeks := div (sub now.Unix .Lastmod.Unix) 604800 -}} + {{- $priority := sub 1 (div $weeks 10.0 ) -}} + {{- if ge .Sitemap.Priority $priority -}} + {{ .Sitemap.Priority }} + {{- else -}} + {{ $priority }} + {{- end -}} + {{- end -}} + + {{- if .IsTranslated -}} + {{- range .Translations -}} + + {{- end -}} + + {{- end -}} + + {{- end -}} +