mirror of https://github.com/jkjoy/hugoblog.git
24 lines
828 B
HTML
24 lines
828 B
HTML
{{ define "main" }}
|
|
<div class="page--archive">
|
|
{{- range (where (where .Site.Pages "Type" "in" "posts") "Kind" "page").GroupByDate "2006" }}
|
|
{{ if (where .Pages "Section" "posts") }}
|
|
<h2 class="archive--title__year">{{ .Key }}</h2>
|
|
{{ range .Pages.ByPublishDate.Reverse.GroupByDate "January" }}
|
|
<h3 class="archive--title__month">{{ .Key }}</h3>
|
|
<ul class="archive--list">
|
|
{{ range ((where .Pages "Section" "posts")) }}
|
|
<li class="archive--item">
|
|
<div class="archive--title">
|
|
<a href="{{ .RelPermalink }}">
|
|
{{ .Title }}
|
|
</a>
|
|
</div>
|
|
<div class="archive--meta">{{ .PublishDate.Format "Jan 02" }}</div>
|
|
</li>
|
|
{{ end }}
|
|
</ul>
|
|
{{ end }}
|
|
{{ end }}
|
|
{{ end }}
|
|
</div>
|
|
{{ end }} |