diff --git a/website/layouts/sitemap.xml b/website/layouts/sitemap.xml new file mode 100644 index 000000000..49f19c4c3 --- /dev/null +++ b/website/layouts/sitemap.xml @@ -0,0 +1,12 @@ +{{ printf "" | safeHTML }} + + {{- range .Data.Pages -}}{{ $currentVersion := index (split .Permalink "/" ) 1 }}{{ $currentVersionDir := $currentVersion | printf "/%s"}}{{ if and .Permalink (ne .Params.sitemap_exclude true) (eq $currentVersionDir site.Params.url_latest_version)}} + + https://talos.dev{{ .Permalink }}{{ if not .Lastmod.IsZero }} + {{ safeHTML (.Lastmod.Format "2006-01-02T15:04:05-07:00") }}{{ end }}{{ with .Sitemap.ChangeFreq }} + {{ . }}{{ end }}{{ if ge .Sitemap.Priority 0.0 }} + {{ .Sitemap.Priority }}{{ end }}{{ if .IsTranslated }}{{ range .Translations }} + {{ end }} + {{ end }} + {{ end }}{{ end }} +