diff options
author | Luke Hsiao <lwhsiao@stanford.edu> | 2019-11-17 06:17:22 +0300 |
---|---|---|
committer | Luke Hsiao <lwhsiao@stanford.edu> | 2019-11-17 06:29:30 +0300 |
commit | d3f069931bab8b9fc09d7d16096dc62c2d1c8c13 (patch) | |
tree | e92f11b2077a39a21d00c377d5e4a8b158fde60b /layouts | |
parent | 61357c080fb8364d81649f451a69d5dbe2e7de35 (diff) |
build: update for Hugo v0.57+
In Hugo v0.57.0, a breaking change was introduced to the `.Pages`
variable [1]. This adopts the new .Site.RegularPages syntax.
https://github.com/gohugoio/hugo/issues/6153
Diffstat (limited to 'layouts')
-rwxr-xr-x | layouts/_default/list.html | 2 | ||||
-rw-r--r-- | layouts/index.html | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 4126e13..3d724ce 100755 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -1,6 +1,6 @@ {{ partial "header.html" . }} <h2 class="c-title p-tag-title">{{ .Title }}</h2> -{{ range $index, $page := (.Paginate (where .Data.Pages "Type" "posts")).Pages }} +{{ range $index, $page := (.Paginate (where .Site.RegularPages "Type" "posts")).Pages }} {{ if ne $index 0 }} {{ end }} {{ .Render "li" }} diff --git a/layouts/index.html b/layouts/index.html index b4df7b7..9d01f6a 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -1,5 +1,5 @@ {{ partial "header.html" . }} -{{ range $index, $page := (.Paginate (where (where .Data.Pages "Type" "posts") ".Params.hidden" "!=" "true" )).Pages }} +{{ range $index, $page := (.Paginate (where (where .Site.RegularPages "Type" "posts") ".Params.hidden" "!=" "true" )).Pages }} {{ if ne $index 0 }} {{ end }} {{ .Render "li" }} |