diff options
author | yyBeta <up9288yy@gmail.com> | 2017-04-26 15:03:35 +0300 |
---|---|---|
committer | coderzh <pythonzh@qq.com> | 2017-05-07 13:22:08 +0300 |
commit | 91b2c8922baef7e2d602e0b12f2f40a3fcd5cab3 (patch) | |
tree | be8f5fb699215276976925ee1852b6b2b2a46293 | |
parent | 8a8c4a79065cfa9ecf1f5427ba06e49bcc7105df (diff) |
fix wrong count of posts of the first month because of 'Site.Pages' change under new version hugo
-rw-r--r-- | layouts/partials/widgets/archive.html | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/layouts/partials/widgets/archive.html b/layouts/partials/widgets/archive.html index 89254fb..456c56a 100644 --- a/layouts/partials/widgets/archive.html +++ b/layouts/partials/widgets/archive.html @@ -2,7 +2,7 @@ <div class="archiveslist"> <p class="asidetitle">{{ .Site.Params.Strings.Archive }}</p> <ul class="archive-list"> - {{ range $value := (where .Site.Pages "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> |