diff options
author | Tyler Burleigh <tylerburleigh@gmail.com> | 2019-12-31 04:36:02 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-12-31 04:36:02 +0300 |
commit | 36c836147aa533032721605e58d688236119a889 (patch) | |
tree | 458122a0eedfefabd36f6a3d98bdc337ac9dcbf4 | |
parent | 2356158ae40813d511c67af0ec9dab3938a52799 (diff) |
.RegularPages to .Site.RegularPages
This seems to resolve the bug I reported here: https://github.com/xiaoheiAh/hugo-theme-pure/issues/63
-rw-r--r-- | layouts/_default/list.html | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 794da11..767cbd3 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -3,11 +3,11 @@ <article class="content article article-archives article-type-list" itemscope=""> <header class="article-header"> <h1 itemprop="title">{{ .Title }}</h1> - <p class="text-muted">{{- T "total_article" (len .RegularPages) }}</p> + <p class="text-muted">{{- T "total_article" (len .Site.RegularPages) }}</p> </header> <div class="article-body"> {{- $currentYearSection := 0}} - {{- range $idx,$page := .RegularPages}} + {{- range $idx,$page := .Site.RegularPages}} {{- $thisYear := $page.Date.Format ("2006") }} {{- if eq $currentYearSection 0 }} {{- $currentYearSection = $thisYear}} @@ -37,4 +37,4 @@ </div> </article> </main> -{{- end }}
\ No newline at end of file +{{- end }} |