diff options
author | coderzh <coderzh@gmail.com> | 2019-08-31 18:42:09 +0300 |
---|---|---|
committer | coderzh <coderzh@gmail.com> | 2019-08-31 18:42:09 +0300 |
commit | ea7d49749d5a87ebba47659e56528987830f7d48 (patch) | |
tree | ae0ef696d440c1d992bf824d7d7bb65ad144f37f | |
parent | df309a2564c6af1bf7df3afedd103b910dbd3772 (diff) |
use mainSections and RegularPages
breaking change from 0.57.0, see gohugoio/hugoThemes#682
-rw-r--r-- | layouts/index.html | 2 | ||||
-rw-r--r-- | layouts/partials/widgets/archive.html | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/layouts/index.html b/layouts/index.html index 5352bb4..fd7697a 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -5,7 +5,7 @@ </header> <div id="container"> <div id="main"> - {{ range $index,$data := first 10 (where .Data.Pages "Type" "post") }} + {{ range $index,$data := first 10 (where site.RegularPages "Type" "post") }} {{ partial "article.html" $data }} {{ end }} <nav id="page-nav" class="clearfix"> diff --git a/layouts/partials/widgets/archive.html b/layouts/partials/widgets/archive.html index 456c56a..10c085e 100644 --- a/layouts/partials/widgets/archive.html +++ b/layouts/partials/widgets/archive.html @@ -1,8 +1,8 @@ -{{ if not (eq (len .Site.Pages) 0) }} +{{ if not (eq (len site.RegularPages) 0) }} <div class="archiveslist"> <p class="asidetitle">{{ .Site.Params.Strings.Archive }}</p> <ul class="archive-list"> - {{ range $value := (where .Site.RegularPages "Type" "post").GroupByDate .Site.Params.MonthFormat }} + {{ range $value := (where site.RegularPages "Type" "post").GroupByDate .Site.Params.MonthFormat }} {{ $url := (index $value.Pages 0).Date.Format "2006-01" | urlize }} <li class="archive-list-item"> <a class="archive-list-link" href="{{ $.Site.BaseURL }}post/#{{ $url }}">{{ .Key }}</a><span class="archive-list-count">{{ len $value.Pages }}</span> |