aboutsummaryrefslogtreecommitdiff
path: root/themes/default/layouts/_default/index.json
diff options
context:
space:
mode:
authortdro <tdro@noreply.example.com>2022-12-06 23:43:53 -0500
committertdro <tdro@noreply.example.com>2022-12-06 23:43:53 -0500
commit0f64a4206a109e4643aca07772d6091f9607068c (patch)
tree750152654fd316c5bd93b0503a1c55812e46795e /themes/default/layouts/_default/index.json
parentcf600839a84be5245397c22658462edbea001157 (diff)
downloadcanory-0f64a4206a109e4643aca07772d6091f9607068c.tar.gz
canory-0f64a4206a109e4643aca07772d6091f9607068c.tar.bz2
canory-0f64a4206a109e4643aca07772d6091f9607068c.zip
themes/default/layouts/partials: Consolidate the content filter into a function
Diffstat (limited to 'themes/default/layouts/_default/index.json')
-rw-r--r--themes/default/layouts/_default/index.json4
1 files changed, 1 insertions, 3 deletions
diff --git a/themes/default/layouts/_default/index.json b/themes/default/layouts/_default/index.json
index 7cfd37d..6cbc1ef 100644
--- a/themes/default/layouts/_default/index.json
+++ b/themes/default/layouts/_default/index.json
@@ -7,9 +7,7 @@
"next_url": "{{ .URL | absURL }}",
{{- end }}
"items": [
- {{- $notExpired := where .Paginator.Pages "Params.expirydate" "eq" nil -}}
- {{- $notUnlisted := where .Paginator.Pages "Params.unlisted" "eq" nil -}}
- {{- $filteredPages := $notExpired | intersect $notUnlisted -}}
+ {{- $filteredPages := partial "function-filters-content.html" .Paginator.Pages -}}
{{- range $index, $data := $filteredPages -}}
{{- if and $index (gt $index 0) -}},{{- end }}
{