Move paige_math, paige_toc to paige object

master
Will Faught 3 years ago
parent ed796f3cac
commit 9d6c08684d

@ -217,8 +217,9 @@ Optional page parameters:
```yaml ```yaml
link: "https://youtu.be/dQw4w9WgXcQ" # The reference for an anchor around the title link: "https://youtu.be/dQw4w9WgXcQ" # The reference for an anchor around the title
paige_math: true # Enable math typesetting with KaTeX paige:
paige_toc: true # Show a table of contents if there are any headers toc: true # Show a table of contents if there are any headers
math: true # Enable math typesetting with KaTeX
``` ```
Additional optional home page parameters: Additional optional home page parameters:

@ -3,7 +3,8 @@ author: Hugo Authors
title: Math Typesetting title: Math Typesetting
date: 2019-03-08 date: 2019-03-08
description: A brief guide to setup KaTeX. description: A brief guide to setup KaTeX.
paige_math: true paige:
math: true
--- ---
Mathematical notation in a Hugo project can be enabled by using third party JavaScript libraries. Mathematical notation in a Hugo project can be enabled by using third party JavaScript libraries.
@ -21,7 +22,7 @@ In this example we will be using [KaTeX](https://katex.org/)
{{ end }} {{ end }}
``` ```
To enable KaTex on a per page basis include the parameter `paige_math: true` in content files To enable KaTex on a per page basis include the parameter `paige.math: true` in content files
**Note:** Use the online reference of [Supported TeX Functions](https://katex.org/docs/supported.html) **Note:** Use the online reference of [Supported TeX Functions](https://katex.org/docs/supported.html)

@ -1,5 +1,5 @@
{{ if .Content }} {{ if .Content }}
{{ if and .Params.paige_toc (ne .TableOfContents `<nav id="TableOfContents"></nav>`) }} {{ if and .Params.paige.toc (ne .TableOfContents `<nav id="TableOfContents"></nav>`) }}
<section> <section>
<div class="container-fluid mb-3"> <div class="container-fluid mb-3">
<div class="justify-content-center row"> <div class="justify-content-center row">

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

@ -3,7 +3,7 @@
{{ else }} {{ 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> <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 }} {{ end }}
{{ if or .Params.paige_math (and .Params.paige_show_full_pages (where .Pages "Params.paige_math" "eq" true)) }} {{ 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-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> <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 }} {{ end }}

Loading…
Cancel
Save