From 78aa2e53c2032d9941a7339f42f74b876004e288 Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Thu, 18 Apr 2024 17:35:49 +0300 Subject: [PATCH 1/3] Remove the now unneeded layouts/sitemap.xml This has now landed upstream and we can exclude stuff from sitemap natively https://github.com/gohugoio/hugo/commit/6738a3e79dd545603d9851832bc3140fd184bfef --- src/layouts/sitemap.xml | 12 ------------ 1 file changed, 12 deletions(-) delete mode 100644 src/layouts/sitemap.xml diff --git a/src/layouts/sitemap.xml b/src/layouts/sitemap.xml deleted file mode 100644 index 9c626df18..000000000 --- a/src/layouts/sitemap.xml +++ /dev/null @@ -1,12 +0,0 @@ -{{ printf "" | safeHTML }} - - {{- range where .Data.Pages "Params.sitemap.exclude" "ne" true -}}{{ if .Permalink }} - - {{ .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 }}{{ if .IsTranslated }}{{ range .Translations }} - {{ end }} - {{ end }} - {{ end }}{{ end }} - From 08a408f284236af6de3118155bd719a9397f70dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20D=C3=A9ramond?= Date: Wed, 24 Apr 2024 11:26:23 +0200 Subject: [PATCH 2/3] Prevent unused `partials/analytics.html` warning when not in production (#465) --- src/layouts/partials/analytics.html | 2 ++ src/layouts/partials/head.html | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/layouts/partials/analytics.html b/src/layouts/partials/analytics.html index c238a6276..818c82a55 100644 --- a/src/layouts/partials/analytics.html +++ b/src/layouts/partials/analytics.html @@ -1 +1,3 @@ +{{- if hugo.IsProduction }} +{{- end }} diff --git a/src/layouts/partials/head.html b/src/layouts/partials/head.html index 890ceb095..f1543193b 100644 --- a/src/layouts/partials/head.html +++ b/src/layouts/partials/head.html @@ -25,6 +25,4 @@ {{ partial "favicons" . -}} {{ partial "social" . -}} {{ partial "scripts" . -}} -{{- if hugo.IsProduction }} {{ partial "analytics" . -}} -{{- end }} From 37ae94c5f1267a8b6af4e05bd95e92ab18c80a3b Mon Sep 17 00:00:00 2001 From: Christian Oliff Date: Wed, 24 Apr 2024 18:26:42 +0900 Subject: [PATCH 3/3] Accessibility improvement (#462) Adds main landmark (this is particularly helpful for screen readers - tested with NVDA on Windows) --- src/layouts/_default/baseof.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/layouts/_default/baseof.html b/src/layouts/_default/baseof.html index 43f338ab2..83334389f 100644 --- a/src/layouts/_default/baseof.html +++ b/src/layouts/_default/baseof.html @@ -12,10 +12,10 @@ -
+
{{ block "main" . }} {{ end }} -
+