From c272eb80bf320140de2f949635d271e376c82890 Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Tue, 25 May 2021 08:32:27 +0300 Subject: [PATCH] Update Hugo config and sitemap.xml (#34074) --- config.yml | 2 +- site/layouts/sitemap.xml | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/config.yml b/config.yml index a39dda368e..f072f329f4 100644 --- a/config.yml +++ b/config.yml @@ -18,7 +18,7 @@ buildFuture: true enableRobotsTXT: true metaDataFormat: "yaml" -disableKinds: ["404", "taxonomy", "taxonomyTerm", "RSS"] +disableKinds: ["404", "taxonomy", "term", "RSS"] publishDir: "_site" diff --git a/site/layouts/sitemap.xml b/site/layouts/sitemap.xml index 972ebf6a54..869f1cbe86 100644 --- a/site/layouts/sitemap.xml +++ b/site/layouts/sitemap.xml @@ -1,10 +1,12 @@ -{{ printf "" | safeHTML }} +{{ printf "" | safeHTML }} - {{- range .Data.Pages -}}{{ if ne .Params.sitemap_exclude true }} + {{- range .Data.Pages -}}{{ if and .Permalink (ne .Params.sitemap_exclude true) }} {{ .Permalink }}{{ if not .Lastmod.IsZero }} {{ safeHTML (.Lastmod.Format "2006-01-02T15:04:05-07:00") }}{{ end }}{{ with .Sitemap.ChangeFreq }} {{ . }}{{ end }}{{ if ge .Sitemap.Priority 0.0 }} - {{ .Sitemap.Priority }}{{ end }} + {{ .Sitemap.Priority }}{{ end }}{{ if .IsTranslated }}{{ range .Translations }} + {{ end }} + {{ end }} {{ end }}{{ end }}