From 0d9fcac5a0fb968bdb6521ead3fcbb799d7db91b Mon Sep 17 00:00:00 2001 From: mtseng15 Date: Mon, 5 May 2025 16:28:14 -0500 Subject: [PATCH] updated docs and added to example config --- README.md | 5 +++-- exampleSite/hugo.toml | 7 +++++++ exampleSite/hugo.yaml | 8 ++++++++ layouts/partials/docs/html-head.html | 2 +- 4 files changed, 19 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 1c6e8e4..691deb8 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,7 @@ - [Blog](#blog) - [Configuration](#configuration) - [Shortcodes](#shortcodes) +- [Math](#math) - [Versioning](#versioning) - [Contributing](#contributing) @@ -177,11 +178,11 @@ disableKinds = ['taxonomy', 'taxonomyTerm'] # Can be overwritten by same param in page frontmatter BookComments = true - # (Optional) Enables a Katex math engine that works with the Goldmark markdown + # (Optional, default false) Enables a Katex math engine that works with the Goldmark markdown # pass through. This removes the need for shortcodes for math. Also requires # defining the pass through delimiters. # See below. - BookKatexMathPassthrough = true + BookKatexMathPassthrough = false # /!\ This is an experimental feature, might be removed or changed at any time # (Optional, experimental, default false) Enables portable links and link checks in markdown pages. diff --git a/exampleSite/hugo.toml b/exampleSite/hugo.toml index 34af293..fcc3ac6 100644 --- a/exampleSite/hugo.toml +++ b/exampleSite/hugo.toml @@ -104,6 +104,13 @@ enableGitInfo = true # Can be overwritten by same param in page frontmatter BookComments = true + # (Optional, default false) Enables a Katex math engine that works with the Goldmark markdown + # pass through. This removes the need for shortcodes for math. Also requires + # defining the pass through delimiters. + # See below. + BookKatexMathPassthrough = false + + # /!\ This is an experimental feature, might be removed or changed at any time # (Optional, experimental, default false) Enables portable links and link checks in markdown pages. # Portable links meant to work with text editors and let you write markdown without {{< relref >}} shortcode diff --git a/exampleSite/hugo.yaml b/exampleSite/hugo.yaml index 3fd0c40..d0094ec 100644 --- a/exampleSite/hugo.yaml +++ b/exampleSite/hugo.yaml @@ -100,6 +100,14 @@ params: # Can be overwritten by same param in page frontmatter BookComments: true + + # (Optional, default false) Enables a Katex math engine that works with the Goldmark markdown + # pass through. This removes the need for shortcodes for math. Also requires + # defining the pass through delimiters. + # See below. + BookKatexMathPassthrough: false + + # /!\ This is an experimental feature, might be removed or changed at any time # (Optional, experimental, default false) Enables portable links and link checks in markdown pages. # Portable links meant to work with text editors and let you write markdown without {{< relref >}} shortcode diff --git a/layouts/partials/docs/html-head.html b/layouts/partials/docs/html-head.html index 3f5358a..73d04eb 100644 --- a/layouts/partials/docs/html-head.html +++ b/layouts/partials/docs/html-head.html @@ -57,6 +57,6 @@ https://github.com/alex-shpak/hugo-book {{- end -}} -{{ if .Param "BookKatexMathPassthrough" }} +{{ if .Site.Param "BookKatexMathPassthrough" }} {{ partialCached "docs/math.html" . }} {{ end }}