mirror of
https://github.com/tiennm99/HugoBlox-kit.git
synced 2026-10-12 22:14:08 +00:00
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:
1 parent
46ba1bb8e3
commit
af6d0bc278
1 file changed
+1
-2
+1
-2
@@ -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 }}
|
||||
|
||||
Reference in new issue
Block a user