refactor: drop support for hidden field in front matter

This commit is contained in:
Jimmy Cai
2022-06-12 11:42:35 +00:00
committed by GitHub
parent 6e5956b905
commit e5f3cb11d5
8 changed files with 8 additions and 23 deletions
+1 -3
View File
@@ -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) }}