Skip to content

Commit

Permalink
Update layout files to support Hugo 0.57.0
Browse files Browse the repository at this point in the history
  • Loading branch information
martignoni committed Aug 15, 2019
1 parent 37bd4c7 commit 85bf897
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion layouts/_default/robots.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
User-agent: *

{{- range where .Data.Pages "Params.robotsdisallow" true }}
{{- range where .Site.RegularPages "Params.robotsdisallow" true }}
Disallow: {{ .RelPermalink }}
{{ end }}

Expand Down
2 changes: 1 addition & 1 deletion layouts/_default/rss.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<copyright>{{.}}</copyright>{{end}}{{ if not .Date.IsZero }}
<lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }}
<atom:link href="{{ .RelPermalink }}" rel="self" type="application/rss+xml" />
{{ range first 15 (where .Data.Pages "Type" "!=" "home") }}
{{ range first 15 (where .Site.RegularPages "Type" "!=" "home") }}
<item>
<title>{{ .Title }}</title>
<link>{{ .Permalink }}</link>
Expand Down
2 changes: 1 addition & 1 deletion layouts/_default/sitemap.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:xhtml="http://www.w3.org/1999/xhtml">
{{ 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) }}
Expand Down
2 changes: 1 addition & 1 deletion layouts/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down

0 comments on commit 85bf897

Please sign in to comment.