diff options
Diffstat (limited to 'layouts/_default/section.html')
-rw-r--r-- | layouts/_default/section.html | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/layouts/_default/section.html b/layouts/_default/section.html new file mode 100644 index 0000000..869c2f1 --- /dev/null +++ b/layouts/_default/section.html @@ -0,0 +1,30 @@ +<!-- This page is the same as the Archives page --> +{{ define "main" }} +<!-- All of the site's posts grouped by year --> + <h1> + Archives + </h1> + <div> + <!-- Group all the post pages from the same year --> + {{ $pages := where site.RegularPages "Type" "in" site.Params.mainSections }} + {{ range ($pages.GroupByDate "2006") }} + <h3>{{ .Key }}</h3> <!-- Display the year --> + + <ul class="archives-list"> + + {{ range (.Pages) }} + + <li class="archives-list-item"> + <span class="archives-list-item-date">{{ .PublishDate.Format "Jan 2" }}</span> + <span> + <a href="{{ .RelPermalink }}">{{ .Title }}</a> + </span> + </li> + {{ end }} + </ul> + {{ end }} + </div> + + <div class="page-footer"></div> + +{{ end }}
\ No newline at end of file |