tpl/tplimpl: Allow content exclusion in sitemap.xml

Closes #653
This commit is contained in:
Kolappan N 2024-03-19 23:33:29 +05:30 committed by Kolappan Nathan
parent 0750a9ec91
commit b6a507a3df

View file

@ -1,7 +1,7 @@
{{ 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 .Data.Pages }}
{{ range where .Data.Pages "Params.sitemap.exclude" "ne" true }}
{{- if .Permalink -}}
<url>
<loc>{{ .Permalink }}</loc>{{ if not .Lastmod.IsZero }}