hugo-theme-more-contentful/layouts/_default/list.html
Gabriel Arazas 092df10444
Switch absolute links to relative links
This is to make testing and deploying between different versions easier
such as Netlify deployments.
2023-04-28 00:55:59 +08:00

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