Skip to content

Commit

Permalink
Math and chem code clocks, autoactivation: fix for use with hugo vers…
Browse files Browse the repository at this point in the history
…ion < 0.93 (#1351)
  • Loading branch information
deining committed Jan 24, 2023
1 parent 1272f99 commit e67205b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
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

0 comments on commit e67205b

Please sign in to comment.