diff --git a/README.md b/README.md index 673fb221..1a7c7609 100644 --- a/README.md +++ b/README.md @@ -217,8 +217,9 @@ Optional page parameters: ```yaml link: "https://youtu.be/dQw4w9WgXcQ" # The reference for an anchor around the title -paige_math: true # Enable math typesetting with KaTeX -paige_toc: true # Show a table of contents if there are any headers +paige: + toc: true # Show a table of contents if there are any headers + math: true # Enable math typesetting with KaTeX ``` Additional optional home page parameters: diff --git a/exampleSite/content/blog/math-typesetting.md b/exampleSite/content/blog/math-typesetting.md index 0b51d289..65b13bf8 100644 --- a/exampleSite/content/blog/math-typesetting.md +++ b/exampleSite/content/blog/math-typesetting.md @@ -3,7 +3,8 @@ author: Hugo Authors title: Math Typesetting date: 2019-03-08 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. @@ -21,7 +22,7 @@ In this example we will be using [KaTeX](https://katex.org/) {{ 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) diff --git a/layouts/partials/paige-content.html b/layouts/partials/paige-content.html index 4710bb14..b8c8f56a 100644 --- a/layouts/partials/paige-content.html +++ b/layouts/partials/paige-content.html @@ -1,5 +1,5 @@ {{ if .Content }} -{{ if and .Params.paige_toc (ne .TableOfContents ``) }} +{{ if and .Params.paige.toc (ne .TableOfContents ``) }}
diff --git a/layouts/partials/paige-link.html b/layouts/partials/paige-link.html index 1d99f45f..665285fd 100644 --- a/layouts/partials/paige-link.html +++ b/layouts/partials/paige-link.html @@ -8,7 +8,7 @@ {{ else }} {{ 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)) }} {{ end }} {{ if .AlternativeOutputFormats }} diff --git a/layouts/partials/paige-script.html b/layouts/partials/paige-script.html index bec47a4f..b40bf3ed 100644 --- a/layouts/partials/paige-script.html +++ b/layouts/partials/paige-script.html @@ -3,7 +3,7 @@ {{ else }} {{ 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)) }} {{ end }}