summaryrefslogtreecommitdiff
path: root/layouts/_default/list.html
diff options
context:
space:
mode:
authorAlexandre Vicenzi <vicenzi.alexandre@gmail.com>2020-05-25 21:47:43 +0200
committerAlexandre Vicenzi <vicenzi.alexandre@gmail.com>2020-05-25 21:47:43 +0200
commit83b9fd18ee4307952caf7c3a5f0cc3ec51c27852 (patch)
tree35407e0ae48fd2af68cf0b9c1c037eac4959dee1 /layouts/_default/list.html
parent43ddf545bf298411ff0287d265e6a762bd3e7532 (diff)
Tag and Categorias templates
Diffstat (limited to 'layouts/_default/list.html')
-rw-r--r--layouts/_default/list.html10
1 files changed, 9 insertions, 1 deletions
diff --git a/layouts/_default/list.html b/layouts/_default/list.html
index b5b6ed3..665318d 100644
--- a/layouts/_default/list.html
+++ b/layouts/_default/list.html
@@ -1,11 +1,19 @@
{{ define "main" -}}
<ul class="posts">
<h1>{{ .Title }}</h1>
- {{ range .Data.Pages -}}
+ {{ $regularPages := .Data.Pages -}}
+ {{ $pagesNotHidden := where $regularPages ".Params.hidden" "==" false }}
+ {{ $pagesHiddenUnset := where $regularPages ".Params.hidden" "==" nil }}
+
+ {{ $pages := $pagesNotHidden | union $pagesHiddenUnset }}
+
+ {{ range $pages -}}
<li>
<span>
<a href="{{ .Permalink }}">{{ .Title }}</a>
+ {{ if eq .Kind "page" }}
<time class="pull-right post-list" datetime="{{ .Date.Format "2006-01-02T15:04:05Z0700" }}">{{ .Date.Format "Jan 2, 2006" }}</time>
+ {{ end }}
</span>
</li>
{{- end }}