{{ 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 }}
    {{- $includeURL := true -}}
    {{- range $val := $.Site.Params.sitemapFilter -}}
      {{- if (in $page.Permalink $val) -}}
        {{- $includeURL = false -}}
      {{- end -}}
    {{- end -}}
    {{- if and $page.Permalink $includeURL -}}
  <url>
    <loc>{{ $page.Permalink }}</loc>{{ if not $page.Lastmod.IsZero }}
    <lastmod>{{ $page.Lastmod.Format "2006-01-02T15:04:05-07:00" | safeHTML }}</lastmod>{{ end }}{{ with $page.Sitemap.ChangeFreq }}
    <changefreq>{{ . }}</changefreq>{{ end }}{{ if ge $page.Sitemap.Priority 0.0 }}
    <priority>{{ $page.Sitemap.Priority }}</priority>{{ end }}{{ if $page.IsTranslated }}{{ range $page.Translations }}
    <xhtml:link rel="alternate" hreflang="{{ .Language.Lang }}" href="{{ .Permalink }}"/>{{ end }}{{ end }}
  </url>
    {{- end -}}
  {{ end }}
</urlset>
