From 3d361ff1c2f783d388b1414a158ae313d4027606 Mon Sep 17 00:00:00 2001 From: Will Faught Date: Sun, 5 Feb 2023 11:22:49 -0800 Subject: [PATCH] Rename paige.math to paige.katex --- README.md | 20 ++++++++++---------- layouts/partials/paige/links.html | 4 ++-- layouts/partials/paige/scripts.html | 12 ++++++------ 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 03b76086..4dc97ea9 100644 --- a/README.md +++ b/README.md @@ -251,6 +251,16 @@ paige: url: "me.jpg" # A page, site, or remote resource glob hide_credit_data: true # Don't credit this project in a data attribute hide_credit_link: true # Don't credit this project in the footer + katex: + autorender: + script_integrity: "sha384-+VBxd3r6XgURycqtZ117nYw44OOcIax56Z4dCRWbxyPt0Koah1uHoK0o4+/RRE05" # File integrity hash + script_src: "https://cdn.jsdelivr.net/npm/katex@0.16.3/dist/contrib/auto-render.min.js" # Local or remote file + script: + script_integrity: "sha384-97gW6UIJxnlKemYavrqDHSX3SiygeOwIZhwyOKRfSaf0JWKRVj9hLASHgFTzT+0O" # File integrity hash + script_src: "https://cdn.jsdelivr.net/npm/katex@0.16.3/dist/katex.min.js" # Local or remote file + style: + link_href: "https://cdn.jsdelivr.net/npm/katex@0.16.3/dist/katex.min.css" # Local or remote file + link_integrity: "sha384-Juol1FqnotbkyZUT5Z7gUPjQ9gzlwCENvUZTpQBAPxtusdwFLRy382PSDx5UUJ4/" # File integrity hash list: authors: class: "text-center text-secondary" # Default is "text-center text-secondary" @@ -282,16 +292,6 @@ paige: title: class: "text-center" # Default is "text-center" hide: false # Default is false - math: - autorender: - script_integrity: "sha384-+VBxd3r6XgURycqtZ117nYw44OOcIax56Z4dCRWbxyPt0Koah1uHoK0o4+/RRE05" # File integrity hash - script_src: "https://cdn.jsdelivr.net/npm/katex@0.16.3/dist/contrib/auto-render.min.js" # Local or remote file - script: - script_integrity: "sha384-97gW6UIJxnlKemYavrqDHSX3SiygeOwIZhwyOKRfSaf0JWKRVj9hLASHgFTzT+0O" # File integrity hash - script_src: "https://cdn.jsdelivr.net/npm/katex@0.16.3/dist/katex.min.js" # Local or remote file - style: - link_href: "https://cdn.jsdelivr.net/npm/katex@0.16.3/dist/katex.min.css" # Local or remote file - link_integrity: "sha384-Juol1FqnotbkyZUT5Z7gUPjQ9gzlwCENvUZTpQBAPxtusdwFLRy382PSDx5UUJ4/" # File integrity hash menu_breakpoint: "sm" # Bootstrap breakpoint at which to display all menu items menu_style: "pills" # Menu item style; must be "links" or "pills"; default is "pills" metadata_max_width: "100ch" # Page metadata max width diff --git a/layouts/partials/paige/links.html b/layouts/partials/paige/links.html index 961560e0..43011d7c 100644 --- a/layouts/partials/paige/links.html +++ b/layouts/partials/paige/links.html @@ -22,8 +22,8 @@ ) }} {{ if or ($page.Param "paige.math") (and ($page.Param "paige.list.content.show") (where $page.Pages "Params.paige.math" "eq" true)) }} {{ partial "paige/link.html" (dict - "href" ($page.Param "paige.math.style.link_href" | default "https://cdn.jsdelivr.net/npm/katex@0.16.3/dist/katex.min.css") - "integrity" ($page.Param "paige.math.style.link_integrity" | default "sha256-NJNVfEC6jfEt62wQMafLNT2eI6BaWONXbpkSEVAs3+8=") + "href" ($page.Param "paige.katex.style.link_href" | default "https://cdn.jsdelivr.net/npm/katex@0.16.3/dist/katex.min.css") + "integrity" ($page.Param "paige.katex.style.link_integrity" | default "sha256-NJNVfEC6jfEt62wQMafLNT2eI6BaWONXbpkSEVAs3+8=") "raw" true ) }} {{ end }} diff --git a/layouts/partials/paige/scripts.html b/layouts/partials/paige/scripts.html index f4c4d45a..fc4a007c 100644 --- a/layouts/partials/paige/scripts.html +++ b/layouts/partials/paige/scripts.html @@ -55,15 +55,15 @@ addEventListener("resize", paigeResize); ) }} {{ if or ($page.Param "paige.math") (and ($page.Param "paige.list.content.show") (where $page.Pages "Params.paige.math" "eq" true)) }} {{ partial "paige/script.html" (dict - "integrity" ($page.Param "paige.math.script.script_integrity") - "raw" ($page.Param "paige.math.script.raw") - "src" ($page.Param "paige.math.script.script_src" | default "https://cdn.jsdelivr.net/npm/katex@0.16.3/dist/katex.min.js") + "integrity" ($page.Param "paige.katex.script.script_integrity") + "raw" ($page.Param "paige.katex.script.raw") + "src" ($page.Param "paige.katex.script.script_src" | default "https://cdn.jsdelivr.net/npm/katex@0.16.3/dist/katex.min.js") ) }} {{ partial "paige/script.html" (dict - "integrity" ($page.Param "paige.math.autorender.script_integrity") + "integrity" ($page.Param "paige.katex.autorender.script_integrity") "onload" "renderMathInElement(document.body);" - "raw" ($page.Param "paige.math.autorender.raw") - "src" ($page.Param "paige.math.autorender.script_src" | default "https://cdn.jsdelivr.net/npm/katex@0.16.3/dist/contrib/auto-render.min.js") + "raw" ($page.Param "paige.katex.autorender.raw") + "src" ($page.Param "paige.katex.autorender.script_src" | default "https://cdn.jsdelivr.net/npm/katex@0.16.3/dist/contrib/auto-render.min.js") ) }} {{ end }} {{ if site.GoogleAnalytics }}