Blog/layouts/_default/sitemap.xml
Vezpi 182806bef8
Some checks failed
Blog Deployment / check-rebuild (push) Successful in 4s
Blog Deployment / build (push) Has been skipped
Blog Deployment / deploy-staging (push) Successful in 8s
Blog Deployment / test-staging (push) Failing after 2s
Blog Deployment / merge (push) Has been skipped
Blog Deployment / deploy-production (push) Has been skipped
Blog Deployment / test-production (push) Has been skipped
Blog Deployment / clean (push) Has been skipped
fix: remove duplicate lang
2025-06-05 07:34:29 +00:00

21 lines
1016 B
XML

{{ printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }}
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:xhtml="http://www.w3.org/1999/xhtml">
{{ range $page := .Data.Pages }}
{{- $incldueURL := true -}}
{{- range $val := $.Site.Params.sitemapFilter -}}
{{- if (strings.Contains $page.Permalink $val ) -}}
{{- $incldueURL = false -}}
{{- end -}}
{{- end -}}
{{- if and .Permalink $incldueURL -}}
<url>
<loc>{{ .Permalink }}</loc>{{ if not .Lastmod.IsZero }}
<lastmod>{{ safeHTML ( .Lastmod.Format "2006-01-02T15:04:05-07:00" ) }}</lastmod>{{ end }}{{ with .Sitemap.ChangeFreq }}
<changefreq>{{ . }}</changefreq>{{ end }}{{ if ge .Sitemap.Priority 0.0 }}
<priority>{{ .Sitemap.Priority }}</priority>{{ end }}{{ if .IsTranslated }}{{ range .Translations }}
<xhtml:link rel="alternate" hreflang="{{ .Language.Lang }}" href="{{ .Permalink }}"/>{{ end }}
</url>
{{- end -}}
{{ end }}
</urlset>