mirror of
https://github.com/foo-dogsquared/hugo-theme-more-contentful.git
synced 2025-01-30 22:57:57 +00:00
Gabriel Arazas
092df10444
This is to make testing and deploying between different versions easier such as Netlify deployments.
22 lines
685 B
HTML
22 lines
685 B
HTML
{{ define "main" }}
|
|
<article>
|
|
<main>{{- .Content }}</main>
|
|
|
|
{{- /* 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 (.Paginate $pages).Pages }}
|
|
<article class="post">
|
|
<h1><a href="{{ .RelPermalink }}" aria-label="{{ .Title }}">{{ .Title }}</a></h1>
|
|
{{ partial "partials/components/post-meta.html" . }}
|
|
</article>
|
|
{{- end }}
|
|
|
|
{{- partial "pagination.html" (dict "Paginator" .Paginator "activeNumberOfPages" 2) }}
|
|
</article>
|
|
{{- end }}
|