Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Math and chem code clocks, autoactivation: fix use with hugo version < 0.93 #1351

Merged
merged 1 commit into from
Jan 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions layouts/partials/scripts.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
{{ $needKaTeX := or .Site.Params.katex.enable .Params.math .Params.chem (.Page.Store.Get "hasKaTeX") (.Page.Store.Get "hasmhchem") -}}
{{ $needmhchem := or .Site.Params.katex.mhchem.enable .Params.chem (.Page.Store.Get "hasmhchem") -}}
{{ $needKaTeX := or .Site.Params.katex.enable .Params.math .Params.chem -}}
{{ $needmhchem := or .Site.Params.katex.mhchem.enable .Params.chem -}}
{{ $needmermaid := .Site.Params.mermaid.enable -}}
{{ if ge hugo.Version "0.93.0" -}}
{{ with .Site.Params.mermaid }}
{{ $needmermaid = true }}
{{ end }}
{{ $needKaTeX = or $needKaTeX (.Page.Store.Get "hasKaTeX") (.Page.Store.Get "hasmhchem") -}}
{{ $needmhchem = or $needmhchem (.Page.Store.Get "hasmhchem") -}}
{{ $needmermaid = or $needmermaid (.Page.Store.Get "hasmermaid") -}}
{{ else -}}
{{ if or $needKaTeX $needmhchem $needmermaid -}}
Expand Down
5 changes: 0 additions & 5 deletions userguide/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,6 @@ params:
theme: default
svg_image_url: https://www.plantuml.com/plantuml/svg/
svg: false
katex:
enable: true
html_dom_element: document.body
mhchem:
enable: true
print:
disable_toc: false
markmap:
Expand Down