diff options
author | tdro <tdro@noreply.example.com> | 2022-12-06 23:43:53 -0500 |
---|---|---|
committer | tdro <tdro@noreply.example.com> | 2022-12-06 23:43:53 -0500 |
commit | 0f64a4206a109e4643aca07772d6091f9607068c (patch) | |
tree | 750152654fd316c5bd93b0503a1c55812e46795e /themes/default/layouts/_default/index.json | |
parent | cf600839a84be5245397c22658462edbea001157 (diff) | |
download | canory-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.json | 4 |
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 }} { |