40 lines
1.1 KiB
HTML
40 lines
1.1 KiB
HTML
|
<main class="main--list">
|
||
|
<header class="page-header">
|
||
|
{{ partial "page_header.html" (dict "page" .) }}
|
||
|
</header>
|
||
|
|
||
|
{{/* Each page is a year section. */}}
|
||
|
{{- $yearPages := .Pages.ByPublishDate.Reverse -}}
|
||
|
{{- $yearLimit := math.Max ($.Site.Params.blog.yearLimit | default 5) 3 -}}
|
||
|
{{- $expandedYears := first $yearLimit $yearPages -}}
|
||
|
{{- $collapsedYears := after $yearLimit $yearPages -}}
|
||
|
|
||
|
{{-
|
||
|
partial "page/section_year_nav.html"
|
||
|
(dict
|
||
|
"years" $expandedYears
|
||
|
"includeCollapsedYearItem" (gt (len $collapsedYears) 0)
|
||
|
)
|
||
|
-}}
|
||
|
|
||
|
{{- .Content -}}
|
||
|
|
||
|
{{ range $expandedYears -}}
|
||
|
<h2 id="{{ .Date | time.Format "2006" }}">{{ .Title }}</h2>
|
||
|
{{ range .RegularPagesRecursive.ByPublishDate.Reverse -}}
|
||
|
{{ if or (not .Draft) hugo.IsDevelopment -}}
|
||
|
{{ .Render "page_summary" }}
|
||
|
{{ end }}
|
||
|
{{ end }}
|
||
|
{{- end }}
|
||
|
|
||
|
{{ with $collapsedYears -}}
|
||
|
<h2 id="older">{{ i18n "olderPagesSectionTitle" }}</h2>
|
||
|
<ul>
|
||
|
{{ range . -}}
|
||
|
<li><a href="{{ .Permalink }}">{{ .LinkTitle | markdownify }}</a></li>
|
||
|
{{ end }}
|
||
|
</ul>
|
||
|
{{ end }}
|
||
|
</main>
|