website/themes/datacoop2020/layouts/index.html
Benjamin Bach 2121cdca5f
Some checks reported errors
continuous-integration/drone/pr Build encountered an error
Colors and fonts for the new data.coop theme
2020-04-05 23:03:14 +02:00

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 -}}