27 lines
735 B
HTML
27 lines
735 B
HTML
|
{{- define "main" -}}
|
||
|
|
||
|
{{ $homepage := "Home" }}
|
||
|
{{ with .Site.Menus.nav }}
|
||
|
{{ range first 1 . }}
|
||
|
{{ $homepage = .Name }}
|
||
|
{{ end }}
|
||
|
{{ end }}
|
||
|
<h1>{{ $homepage }}</h1>
|
||
|
|
||
|
{{ $pages := where site.RegularPages "Type" "in" site.Params.mainSections }}
|
||
|
{{ range $pages.ByPublishDate.Reverse }}
|
||
|
<p>
|
||
|
<a href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
|
||
|
{{ $customDateFormat := "January 2, 2006" }}
|
||
|
{{ with .Site.Params.customDateFormat }}{{ $customDateFormat = . }}{{ end }}
|
||
|
<br>
|
||
|
<small class="text-secondary">{{ .PublishDate.Format $customDateFormat }}</small>
|
||
|
{{ partial "tags" . }}
|
||
|
{{ if eq .Site.Params.showPostSummary true }}
|
||
|
<br>
|
||
|
{{ .Summary }}
|
||
|
{{ end }}
|
||
|
</p>
|
||
|
{{ end }}
|
||
|
|
||
|
{{- end -}}
|