{{ define "main" }}
{{- partial "header.html" . -}}
{{ $allPosts := where .Site.RegularPages "Type" "eq" "posts" }} {{ $excludePosts := where $allPosts "Params.categories" "intersect" (slice "1") }} {{ $postPages := $allPosts | complement $excludePosts }} {{ if .Site.Params.showPostCount }}

共 {{ len $postPages }} 篇文章

{{ end }}
{{ if gt (len $postPages) 0 }} {{ range $postPages.GroupByDate "2006" }}

{{ .Key }} 年 ({{ len .Pages }})

    {{ range .Pages }}
  • {{ .Title }}
  • {{ end }}
{{ end }} {{ else }}

暂无文章

{{ end }}

{{ end }}