summaryrefslogtreecommitdiffstats
path: root/tpl/tplimpl/embedded/templates.autogen.go
diff options
context:
space:
mode:
authorJeremy Epstein <jazepstein@gmail.com>2021-02-07 04:30:09 +1100
committerGitHub <noreply@github.com>2021-02-06 18:30:09 +0100
commit4867cd1dea34ee53fb73cede2bcff4792e470104 (patch)
tree6918d1ac19bdd12e2defa30d45b33772b2ea104e /tpl/tplimpl/embedded/templates.autogen.go
parent92c6c40419bdc13b8bb422a212d1d79240356651 (diff)
tpl/embedded: Exclude pages without Permalink from sitemap
Diffstat (limited to 'tpl/tplimpl/embedded/templates.autogen.go')
-rw-r--r--tpl/tplimpl/embedded/templates.autogen.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/tpl/tplimpl/embedded/templates.autogen.go b/tpl/tplimpl/embedded/templates.autogen.go
index 27a405bd8..316d4b1ef 100644
--- a/tpl/tplimpl/embedded/templates.autogen.go
+++ b/tpl/tplimpl/embedded/templates.autogen.go
@@ -63,6 +63,7 @@ var EmbeddedTemplates = [][2]string{
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:xhtml="http://www.w3.org/1999/xhtml">
{{ range .Data.Pages }}
+ {{- if .Permalink -}}
<url>
<loc>{{ .Permalink }}</loc>{{ if not .Lastmod.IsZero }}
<lastmod>{{ safeHTML ( .Lastmod.Format "2006-01-02T15:04:05-07:00" ) }}</lastmod>{{ end }}{{ with .Sitemap.ChangeFreq }}
@@ -79,6 +80,7 @@ var EmbeddedTemplates = [][2]string{
href="{{ .Permalink }}"
/>{{ end }}
</url>
+ {{- end -}}
{{ end }}
</urlset>
`},