diff options
Diffstat (limited to 'layouts/partials')
-rw-r--r-- | layouts/partials/article/components/related-content.html | 2 | ||||
-rw-r--r-- | layouts/partials/data/title.html | 7 | ||||
-rw-r--r-- | layouts/partials/widget/archives.html | 4 |
3 files changed, 4 insertions, 9 deletions
diff --git a/layouts/partials/article/components/related-content.html b/layouts/partials/article/components/related-content.html index aba88e3..822fc73 100644 --- a/layouts/partials/article/components/related-content.html +++ b/layouts/partials/article/components/related-content.html @@ -1,4 +1,4 @@ -{{ $related := (where (.Site.RegularPages.Related .) "Params.hidden" "!=" true) | first 5 }} +{{ $related := .Site.RegularPages.Related . | first 5 }} {{ with $related }} <aside class="related-content--wrapper"> <h2 class="section-title">{{ T "article.relatedContent" }}</h2> diff --git a/layouts/partials/data/title.html b/layouts/partials/data/title.html index 85a7bc7..938a5da 100644 --- a/layouts/partials/data/title.html +++ b/layouts/partials/data/title.html @@ -6,9 +6,7 @@ <!-- Build paginator --> {{ $pages := where .Site.RegularPages "Section" "in" .Site.Params.mainSections }} - {{ $notHidden := where .Site.RegularPages "Params.hidden" "!=" true }} - {{ $filtered := ($pages | intersect $notHidden) }} - {{ $pag := .Paginate ($filtered) }} + {{ $pag := .Paginate ($pages) }} {{ if .Paginator.HasPrev }} <!-- Paginated. Append page number to title --> @@ -20,8 +18,7 @@ <!-- Taxonomy page --> <!-- Build paginator --> - {{ $notHidden := where .Pages "Params.hidden" "!=" true }} - {{ $pag := .Paginate ($notHidden) }} + {{ $pag := .Paginate .Pages }} <!-- {TAXONOMY_TYPE}: {TAXONOMY_TERM} --> {{ $title = slice (title .Data.Singular) ": " $title }} diff --git a/layouts/partials/widget/archives.html b/layouts/partials/widget/archives.html index 1f2abc5..e42da27 100644 --- a/layouts/partials/widget/archives.html +++ b/layouts/partials/widget/archives.html @@ -10,9 +10,7 @@ <h2 class="widget-title section-title">{{ T "widget.archives.title" }}</h2> {{ $pages := where $context.Site.RegularPages "Type" "in" $context.Site.Params.mainSections }} - {{ $notHidden := where $context.Site.RegularPages "Params.hidden" "!=" true }} - {{ $filtered := ($pages | intersect $notHidden) }} - {{ $archives := $filtered.GroupByDate "2006" }} + {{ $archives := $pages.GroupByDate "2006" }} <div class="widget-archive--list"> {{ range $index, $item := first (add $limit 1) ($archives) }} |