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

github.com/kakawait/hugo-tranquilpeak-theme.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan <alan@yggdrasil.net>2020-07-15 23:12:30 +0300
committerThibaud Lepretre <thibaud.lepretre@gmail.com>2021-08-11 15:04:00 +0300
commit4832198953900279adf45e47649c921afb78d925 (patch)
treeb913fd5fd1881b23d8775e7e6bfbd91a9fd87b0b
parentc251857a1060dcbe2ecc794d897278e589e29bb0 (diff)
MOD: loop over mainSections
-rw-r--r--layouts/taxonomy/archive.terms.html2
-rw-r--r--layouts/taxonomy/category.html4
-rw-r--r--layouts/taxonomy/category.terms.html2
-rw-r--r--layouts/taxonomy/tag.html4
4 files changed, 6 insertions, 6 deletions
diff --git a/layouts/taxonomy/archive.terms.html b/layouts/taxonomy/archive.terms.html
index 114a3b4..032d4ff 100644
--- a/layouts/taxonomy/archive.terms.html
+++ b/layouts/taxonomy/archive.terms.html
@@ -11,7 +11,7 @@
<form id="filter-form" action="#">
<input name="date" type="text" class="form-control input--xlarge" placeholder="{{ i18n "global.search_date" }}" autofocus="autofocus">
</form>
- {{ partial "archive-post.html" (where .Site.RegularPages "Type" "posts") }}
+ {{ partial "archive-post.html" (where .Site.RegularPages "Type" "in" site.Params.mainSections) }}
</div>
</div>
</div>
diff --git a/layouts/taxonomy/category.html b/layouts/taxonomy/category.html
index e3f9516..2aeeacb 100644
--- a/layouts/taxonomy/category.html
+++ b/layouts/taxonomy/category.html
@@ -12,7 +12,7 @@
{{ with .Params.coverCaption }}hasCoverCaption{{ end }}">
{{ if or (not (isset .Site.Params "categoryPagination")) (.Site.Params.categoryPagination) }}
<section class="postShorten-group main-content-wrap">
- {{ $paginator := .Paginate (where .Data.Pages "Type" "posts") }}
+ {{ $paginator := .Paginate (where .Data.Pages "Type" "in" site.Params.mainSections) }}
{{ range $paginator.Pages }}
{{ .Render "summary" }}
{{ end }}
@@ -23,7 +23,7 @@
<form id="filter-form" action="#">
<input name="date" type="text" class="form-control input--xlarge" placeholder="{{ i18n "global.search_date" }}" autofocus="autofocus">
</form>
- {{ partial "archive-post.html" (where .Data.Pages "Type" "posts") }}
+ {{ partial "archive-post.html" (where .Data.Pages "Type" "in" site.Params.mainSections) }}
</div>
{{ end }}
{{ partial "footer.html" . }}
diff --git a/layouts/taxonomy/category.terms.html b/layouts/taxonomy/category.terms.html
index bef6039..c39e796 100644
--- a/layouts/taxonomy/category.terms.html
+++ b/layouts/taxonomy/category.terms.html
@@ -1,6 +1,6 @@
{{ if $.Site.Params.hierarchicalCategories }}
{{ $.Scratch.Set "max-level" 0 }}
- {{ range where $.Site.RegularPages "Type" "posts" }}
+ {{ range where $.Site.RegularPages "Type" "in" site.Params.mainSections }}
{{ $page := . }}
{{ if .Params.categories }}
{{ $categories := (apply .Params.categories "urlize" ".") }}
diff --git a/layouts/taxonomy/tag.html b/layouts/taxonomy/tag.html
index 6438b92..0e6cd7d 100644
--- a/layouts/taxonomy/tag.html
+++ b/layouts/taxonomy/tag.html
@@ -12,7 +12,7 @@
{{ with .Params.coverCaption }}hasCoverCaption{{ end }}">
{{ if or (not (isset .Site.Params "tagPagination")) (.Site.Params.tagPagination) }}
<section class="postShorten-group main-content-wrap">
- {{ $paginator := .Paginate (where .Data.Pages "Type" "posts") }}
+ {{ $paginator := .Paginate (where .Data.Pages "Type" "in" site.Params.mainSections) }}
{{ range $paginator.Pages }}
{{ .Render "summary" }}
{{ end }}
@@ -23,7 +23,7 @@
<form id="filter-form" action="#">
<input name="date" type="text" class="form-control input--xlarge" placeholder="{{ i18n "global.search_date" }}" autofocus="autofocus">
</form>
- {{ partial "archive-post.html" (where .Data.Pages "Type" "posts") }}
+ {{ partial "archive-post.html" (where .Data.Pages "Type" "in" site.Params.mainSections) }}
</div>
{{ end }}
{{ partial "footer.html" . }}