Эх сурвалжийг харах

Exclude all widgets from the sitemap (#613)

Previously, widgets outside of the `home` folder may have appeared in the sitemap.
Dominik Schürmann 7 жил өмнө
parent
commit
af6d0bc278
1 өөрчлөгдсөн 1 нэмэгдсэн , 2 устгасан
  1. 1 2
      layouts/sitemap.xml

+ 1 - 2
layouts/sitemap.xml

@@ -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 }}