Add: Special layout for archive section

feature/oscar-theme
Óscar M. Lage 2022-03-01 00:03:14 +01:00
parent f9c906ef51
commit c859eb3fd5
1 changed files with 23 additions and 0 deletions

View File

@ -0,0 +1,23 @@
{{ define "main" }}
<main class="main wrapper">
<h1>Archive</h1>
<div class="post">
{{ .Content }}
{{ range (where .Site.RegularPages "Type" "posts").GroupByDate "2006" }}
<h2>{{ .Key }}</h2>
<p>{{ len .Pages }} posts</p>
<ul>
{{ range .Pages }}
<li><a href="{{ .Permalink }}">{{ .Title }}</a> - {{ .Date.Format "January 2" }}</li>
{{ end }}
</ul>
{{ end }}
</div>
</main>
{{ end }}