Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/pjbakker/flexible-seo-hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/partials/homes/simple.html')
-rw-r--r--layouts/partials/homes/simple.html22
1 files changed, 6 insertions, 16 deletions
diff --git a/layouts/partials/homes/simple.html b/layouts/partials/homes/simple.html
index 045dcf4..ef5eb30 100644
--- a/layouts/partials/homes/simple.html
+++ b/layouts/partials/homes/simple.html
@@ -1,5 +1,9 @@
{{- $showGeneratedList := $.Params.showGeneratedList | default $.Site.Params.showGeneratedList | default true }}
{{- $showItemMeta := $.Params.showItemMeta | default $.Site.Params.showItemMeta | default true }}
+{{- $pages := $.Site.RegularPages -}}
+{{- if $.Site.Params.homeSections -}}
+ {{- $pages = where $.Site.RegularPages "Section" "in" .Site.Params.homeSections -}}
+{{- end -}}
<div class="container" role="main">
{{- with .Content }}
<article>
@@ -11,24 +15,10 @@
</article>
{{- end }}
{{ if eq $showGeneratedList true -}}
- {{ with .Sections }}
- <div class="row justify-content-center">
- <div class="col-lg-8">
- <ul class="list-group">
- {{ range . }}
- <li class="list-group-item d-flex justify-content-between align-items-center">
- <a href="{{.Permalink}}">{{ .Title }}</a>
- <span class="badge badge-pill badge-primary">{{ len .Pages }}</span>
- </li>
- {{ end }}
- </ul>
- </div>
- </div>
- {{ end }}
-
<div class="row justify-content-center mt-3">
<div class="col-lg-8 posts-list">
- {{ range .Paginator.Pages }}
+ {{ $pag := .Paginate $pages }}
+ {{ range $pag.Pages }}
<article class="list-preview">
<a href="{{ .Permalink }}">
<h2 class="item-title">{{ .Title }}</h2>