2020-11-05 04:34:37 +00:00
|
|
|
{{- define "main" -}}
|
|
|
|
|
2023-02-25 00:06:18 +00:00
|
|
|
<main>
|
2020-11-05 04:34:37 +00:00
|
|
|
<h1>{{ .Title }}</h1>
|
|
|
|
|
|
|
|
{{ .Content }}
|
|
|
|
|
|
|
|
{{- /* Creating a section that lists out regular pages by year */ -}}
|
|
|
|
{{ range $.Site.RegularPages.GroupByPublishDate "2006" }}
|
|
|
|
{{- /* Skip regular pages with an invalid creation date string. */ -}}
|
|
|
|
{{- /* This is convenient if we want to exclude certain posts to be listed by giving no value to `date` in the frontmatter. */ -}}
|
|
|
|
{{- /* We will also exclude hidden pages. */ -}}
|
|
|
|
{{ if ne .Key "0001" }}
|
|
|
|
<section data-year="{{ .Key }}">
|
|
|
|
<h2 id="{{ .Key }}">{{ .Key }}</h2>
|
2021-02-01 04:34:15 +00:00
|
|
|
<ul class="posts--list">
|
2020-11-05 04:34:37 +00:00
|
|
|
{{- range .Pages -}}
|
2021-02-01 04:34:15 +00:00
|
|
|
<li class="post--list">
|
|
|
|
<date class="post--list__date">{{ .PublishDate.Format "2006-01-02" }}</date>
|
2023-05-03 07:39:51 +00:00
|
|
|
<a class="post--list__title" aria-label="{{ .Title }}" href="{{ .RelPermalink }}">{{ .Title }}</a>
|
2020-11-05 04:34:37 +00:00
|
|
|
</li>
|
|
|
|
{{- end -}}
|
|
|
|
</ul>
|
|
|
|
</section>
|
|
|
|
{{- end }}
|
|
|
|
{{ end }}
|
2023-02-25 00:06:18 +00:00
|
|
|
</main>
|
2020-11-05 04:34:37 +00:00
|
|
|
{{- end -}}
|