website/layouts/index.html
2020-11-07 00:16:16 +08:00

12 lines
340 B
HTML

{{ define "main" }}
<hr>
{{ .Content }}
{{- /* The homepage should show only pages from the given sections (with `$.Site.Params.mainSections`).
Otherwise, we take the pages of a section. */ -}}
{{- $pages := .Pages }}
{{- if .IsHome }}
{{- $pages = where $.Site.RegularPages "Type" "in" $.Site.Params.mainSections }}
{{- end }}
{{- end }}