diff options
| author | nanxiaobei <nanxiaobei@gmail.com> | 2020-01-16 03:24:22 +0800 |
|---|---|---|
| committer | nanxiaobei <nanxiaobei@gmail.com> | 2020-01-16 03:24:22 +0800 |
| commit | 2b9088cff62211e6f88a8f9b724090d7bd293fb6 (patch) | |
| tree | 08d38ca9f68228a69ba3cdd62c0a069944fe7931 /layouts/_default/list.html | |
| parent | 35cf31b81f77b51d4518c9ba904d41958ce87cd9 (diff) | |
update pages source
Diffstat (limited to 'layouts/_default/list.html')
| -rw-r--r-- | layouts/_default/list.html | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 4c84589..f734ee9 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -1,18 +1,14 @@ {{ partial "header.html" . }} -{{ $pctx := . }} -{{ if .IsHome }} -{{ $pctx = .Site }} -{{ else }} +{{ if not .IsHome }} <header class="page-header"> <h1>{{ if eq .Data.Singular "tag" }}{{ .Data.Term }}{{ else }}Posts{{ end }}</h1> </header> {{ end }} -{{ $paginator := .Paginate (where $pctx.RegularPages "Type" "in" .Site.Params.mainSections) }} +{{ $paginator := .Paginate (where .Site.RegularPages ".Params.type" "!=" "page") }} -{{ if gt $paginator.TotalPages 0 }} {{ range $index, $page := $paginator.Pages }} <article class="{{ if and $.IsHome (eq $paginator.PageNumber 1) (eq $index 0) }}first-entry{{ else }}post-entry{{ end }}"> <header class="entry-header"> @@ -27,7 +23,6 @@ <a class="entry-link" href="{{ .Permalink }}"></a> </article> {{ end }} -{{ end }} {{ if gt $paginator.TotalPages 1 }} <footer class="page-footer"> |
