Exclude all widgets from the sitemap (#613)

Previously, widgets outside of the `home` folder may have appeared in the sitemap.
This commit is contained in:
Dominik Schürmann authored and gcushen committed 2018-08-01 22:37:03 +01:00
1 parent 46ba1bb8e3
commit af6d0bc278
1 file changed
+1 -2
+1 -2
View File
@@ -1,7 +1,6 @@
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml">
{{ range (where .Data.Pages "Section" "!=" "home") }}
{{ $perm := add $.Site.LanguagePrefix "/home/" }}
{{ if ne .RelPermalink $perm }}
{{ if not .Params.widget }}
<url>
{{ if .IsTranslated }}
<xhtml:link rel="alternate" href="{{ .Permalink }}" hreflang="{{ .Lang }}"/>{{ range .Translations }}