mirror of
https://github.com/foo-dogsquared/hugo-theme-more-contentful.git
synced 2025-01-31 10:58:19 +00:00
2f06fd7861
All of the changes should be documented in the changelog.
21 lines
686 B
HTML
21 lines
686 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 }}
|
|
|
|
{{- range (where (.Paginate $pages).Pages "Params.hidden" "!=" true) }}
|
|
<article class="post">
|
|
<h1><a href="{{ .Permalink }}" aria-label="{{ .Title }}">{{ .Title }}</a></h1>
|
|
{{ partial "partials/components/post-meta.html" . }}
|
|
</article>
|
|
{{- end }}
|
|
|
|
{{- partial "pagination.html" (dict "Paginator" .Paginator "activeNumberOfPages" 2) }}
|
|
{{- end }}
|