2019-09-20 16:11:12 +00:00
|
|
|
{{ define "main" }}
|
|
|
|
<hr>
|
2020-05-12 08:31:55 +00:00
|
|
|
{{ .Content }}
|
2019-09-20 16:11:12 +00:00
|
|
|
|
2020-10-21 03:28:02 +00:00
|
|
|
{{- /* The homepage should show only pages from the given sections (with `$.Site.Params.mainSections`).
|
|
|
|
Otherwise, we take the pages of a section. */ -}}
|
2019-09-20 16:11:12 +00:00
|
|
|
{{ $pages := .Pages }}
|
|
|
|
{{ if .IsHome }}
|
|
|
|
{{ $pages = where $.Site.RegularPages "Type" "in" $.Site.Params.mainSections }}
|
|
|
|
{{ end }}
|
2020-10-21 03:28:02 +00:00
|
|
|
|
2020-05-12 08:31:55 +00:00
|
|
|
{{ range (where (.Paginate $pages).Pages "Params.hidden" "!=" true) }}
|
2019-09-20 16:11:12 +00:00
|
|
|
<article class="post">
|
2020-10-23 19:13:14 +00:00
|
|
|
<h1><a href="{{ .Permalink }}" aria-label="{{ .Title }}">{{ .Title }}</a></h1>
|
|
|
|
<div class="post__meta">
|
|
|
|
<time datetime="{{ .Date.Format "2006-01-02" }}">{{ .Date.Format "2006-01-02" }}</time>
|
2020-10-24 12:48:43 +00:00
|
|
|
{{- if and .GitInfo (ne (.Date.Format "2006-01-02") (.Lastmod.Format "2006-01-02")) }}
|
2020-10-23 19:13:14 +00:00
|
|
|
(Modified on <time datetime="{{ .Lastmod.Format "2006-01-02" }}">{{ .Lastmod.Format "2006-01-02" }}</time>)
|
|
|
|
{{- end }}
|
|
|
|
</div>
|
2019-09-20 16:11:12 +00:00
|
|
|
</article>
|
|
|
|
{{ end }}
|
|
|
|
|
2020-10-23 19:09:11 +00:00
|
|
|
{{ partial "pagination.html" (dict "Paginator" .Paginator "activeNumberOfPages" 2) }}
|
2020-05-09 07:19:04 +00:00
|
|
|
{{ end }}
|