From 85bf8974e55e73713c2bcfb9473527f1c2b17cd3 Mon Sep 17 00:00:00 2001 From: Nicolas Martignoni Date: Thu, 15 Aug 2019 13:44:23 +0200 Subject: [PATCH] Update layout files to support Hugo 0.57.0 - See https://github.com/gohugoio/hugoThemes/issues/678. --- layouts/_default/robots.txt | 2 +- layouts/_default/rss.xml | 2 +- layouts/_default/sitemap.xml | 2 +- layouts/index.html | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/layouts/_default/robots.txt b/layouts/_default/robots.txt index fcfcd49..9105bb1 100644 --- a/layouts/_default/robots.txt +++ b/layouts/_default/robots.txt @@ -1,6 +1,6 @@ User-agent: * -{{- range where .Data.Pages "Params.robotsdisallow" true }} +{{- range where .Site.RegularPages "Params.robotsdisallow" true }} Disallow: {{ .RelPermalink }} {{ end }} diff --git a/layouts/_default/rss.xml b/layouts/_default/rss.xml index f9f87d0..f0b8ae3 100644 --- a/layouts/_default/rss.xml +++ b/layouts/_default/rss.xml @@ -10,7 +10,7 @@ {{.}}{{end}}{{ if not .Date.IsZero }} {{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}{{ end }} - {{ range first 15 (where .Data.Pages "Type" "!=" "home") }} + {{ range first 15 (where .Site.RegularPages "Type" "!=" "home") }} {{ .Title }} {{ .Permalink }} diff --git a/layouts/_default/sitemap.xml b/layouts/_default/sitemap.xml index ee8ae1f..4850436 100644 --- a/layouts/_default/sitemap.xml +++ b/layouts/_default/sitemap.xml @@ -1,6 +1,6 @@ - {{ range where .Data.Pages "Params.robotsdisallow" "!=" true }} + {{ range where .Site.RegularPages "Params.robotsdisallow" "!=" true }} {{ $default_noindex_kinds := slice "section" }} {{ $noindex_kinds := .Site.Params.noindex_kinds | default $default_noindex_kinds }} {{ if not (in $noindex_kinds .Kind) }} diff --git a/layouts/index.html b/layouts/index.html index 61c666a..270c0e7 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -9,7 +9,7 @@ {{ define "main" }} - {{ $paginator := .Paginate (where .Data.Pages "Type" "posts") }} + {{ $paginator := .Paginate (where .Site.RegularPages "Type" "posts") }} {{ range $paginator.Pages }} {{- partial "page-summary" . -}} {{ end }}