Skip to content

Commit

Permalink
use mainSections and RegularPages
Browse files Browse the repository at this point in the history
breaking change from 0.57.0, see gohugoio/hugoThemes#682
  • Loading branch information
coderzh committed Aug 31, 2019
1 parent df309a2 commit ea7d497
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion layouts/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -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">
Expand Down
4 changes: 2 additions & 2 deletions layouts/partials/widgets/archive.html
Original file line number Diff line number Diff line change
@@ -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>
Expand Down

0 comments on commit ea7d497

Please # to comment.