Use where func instead of paigelistmath scratch

master
Will Faught 3 years ago
parent 06f39fb1a9
commit 56f26a6317

@ -8,7 +8,7 @@
{{ else }}
<link crossorigin="anonymous" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.2/font/bootstrap-icons.css" integrity="sha384-b6lVK+yci+bfDmaY1u0zE8YYJt0TZxLEAFyYSLHId4xoVvsrQu3INevFKo+Xir8e" rel="stylesheet">
{{ end }}
{{ if .Params.paige_math }}
{{ if or .Params.paige_math (and .Params.paige_show_full_pages (where .Pages "Params.paige_math" "eq" true)) }}
<link crossorigin="anonymous" href="https://cdn.jsdelivr.net/npm/katex@0.16.3/dist/katex.min.css" integrity="sha384-Juol1FqnotbkyZUT5Z7gUPjQ9gzlwCENvUZTpQBAPxtusdwFLRy382PSDx5UUJ4/" rel="stylesheet">
{{ end }}
{{ if .AlternativeOutputFormats }}

@ -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 }}

@ -3,7 +3,7 @@
{{ else }}
<script crossorigin="anonymous" defer integrity="sha384-OERcA2EqjJCMA+/3y+gxIOqMEjwtxJY7qPCqsdltbNJuaOe923+mo//f6V8Qbsw3" referrerpolicy="no-referrer" src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.2/dist/js/bootstrap.bundle.min.js"></script>
{{ 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)) }}
<script crossorigin="anonymous" defer integrity="sha384-97gW6UIJxnlKemYavrqDHSX3SiygeOwIZhwyOKRfSaf0JWKRVj9hLASHgFTzT+0O" referrerpolicy="no-referrer" src="https://cdn.jsdelivr.net/npm/katex@0.16.3/dist/katex.min.js"></script>
<script crossorigin="anonymous" defer integrity="sha384-+VBxd3r6XgURycqtZ117nYw44OOcIax56Z4dCRWbxyPt0Koah1uHoK0o4+/RRE05" onload="renderMathInElement(document.body);" referrerpolicy="no-referrer" src="https://cdn.jsdelivr.net/npm/katex@0.16.3/dist/contrib/auto-render.min.js"></script>
{{ end }}

Loading…
Cancel
Save