From 56f26a63179b35ed7ed86c108b90f496d3c3570a Mon Sep 17 00:00:00 2001 From: Will Faught Date: Fri, 16 Dec 2022 17:26:41 -0800 Subject: [PATCH] Use where func instead of paigelistmath scratch --- layouts/partials/paige-link.html | 2 +- layouts/partials/paige-pages.html | 3 --- layouts/partials/paige-script.html | 2 +- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/layouts/partials/paige-link.html b/layouts/partials/paige-link.html index 337d413f..6ac53df7 100644 --- a/layouts/partials/paige-link.html +++ b/layouts/partials/paige-link.html @@ -8,7 +8,7 @@ {{ else }} {{ end }} -{{ if .Params.paige_math }} +{{ if or .Params.paige_math (and .Params.paige_show_full_pages (where .Pages "Params.paige_math" "eq" true)) }} {{ end }} {{ if .AlternativeOutputFormats }} diff --git a/layouts/partials/paige-pages.html b/layouts/partials/paige-pages.html index debc9478..0a46e89f 100644 --- a/layouts/partials/paige-pages.html +++ b/layouts/partials/paige-pages.html @@ -3,9 +3,6 @@ {{ $page := . }} {{ $p := .Paginate .Pages }} {{ range $p.Pages }} -{{ if .Params.math }} -{{ $page.Scratch.Set "paigelistmath" true }} -{{ end }} {{ partial "paige-article.html" . }} {{ end }} {{ if or $p.HasPrev $p.HasNext }} diff --git a/layouts/partials/paige-script.html b/layouts/partials/paige-script.html index 11b75b70..ffc5fc44 100644 --- a/layouts/partials/paige-script.html +++ b/layouts/partials/paige-script.html @@ -3,7 +3,7 @@ {{ else }} {{ end }} -{{ if or .Params.paige_math (.Scratch.Get "paigelistmath") }} +{{ if or .Params.paige_math (and .Params.paige_show_full_pages (where .Pages "Params.paige_math" "eq" true)) }} {{ end }}