-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: 1bl4z3r <[email protected]>
- Loading branch information
Showing
5 changed files
with
38 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,15 @@ | ||
{{ if or (.Site.Params.global_mathjax) (.Params.mathjax) }} | ||
<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js"></script> | ||
{{ $mathjaxa := resources.Get "js/mathjax-assistant.js"}} | ||
{{ $mathjaxscript := slice $mathjaxa | resources.Concat "js/mathjaxs.js" | minify | fingerprint -}} | ||
<script type="text/javascript" id="MathJax-script" async src="{{ $mathjaxscript.Permalink }}" {{ printf "integrity=%q" $mathjaxscript.Data.Integrity | safeHTMLAttr }} crossorigin="anonymous"></script> | ||
{{- with $mathjaxLib := $.Site.Params.mathjaxLib | default "https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js" -}} | ||
{{- if not (or (findRE `http[s]{0,1}://` $mathjaxLib 1) (findRE `^\/.*` $mathjaxLib 1)) -}} | ||
{{ $mj := resources.Get $mathjaxLib }} | ||
<script id="MathJax-script" type="text/javascript" async src="{{ $mj.Permalink }}" {{ printf "integrity=%q" $mj.Data.Integrity | safeHTMLAttr }} crossorigin="anonymous"></script> | ||
{{- else if findRE `^\/.*` $mathjaxLib 1 -}} | ||
{{ $mj := printf "%s%s" $.Site.BaseURL (strings.TrimLeft "/" $mathjaxLib) }} | ||
<script id="MathJax-script" type="text/javascript" async src="{{ $mj }}" crossorigin="anonymous"></script> | ||
{{- else -}} | ||
<script id="MathJax-script" type="text/javascript" async src="{{ $mathjaxLib }}" crossorigin="anonymous"></script> | ||
{{- end -}} | ||
{{- end -}} | ||
{{ $mathjaxa := resources.Get "js/mathjax-assistant.js" | minify | fingerprint }} | ||
<script type="text/javascript" id="MathJax-script-helper" async src="{{ $mathjaxa.Permalink }}" {{ printf "integrity=%q" $mathjaxa.Data.Integrity | safeHTMLAttr }} crossorigin="anonymous"></script> | ||
{{ end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,23 @@ | ||
{{- if .Page.Store.Get "hasMermaid" -}} | ||
<script defer async type="module"> | ||
import mermaid from 'https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.esm.min.mjs'; | ||
mermaid.initialize({ startOnLoad: true,theme: 'dark' }); | ||
</script> | ||
{{- $mermaid_initialize := `startOnLoad: true,theme: 'dark'` -}} | ||
{{- with $mermaidLib := $.Site.Params.mermaidLib | default "https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.esm.min.mjs" -}} | ||
{{- if not (or (findRE `http[s]{0,1}://` $mermaidLib 1) (findRE `^\/.*` $mermaidLib 1)) -}} | ||
{{ $mm := resources.Get $mermaidLib }} | ||
<script defer async type="module"> | ||
import mermaid from '{{ $mm.Permalink }}'; | ||
mermaid.initialize({ {{ $mermaid_initialize | safeJS }} }); | ||
</script> | ||
{{- else if findRE `^\/.*` $mermaidLib 1 -}} | ||
{{ $mm := printf "%s%s" $.Site.BaseURL (strings.TrimLeft "/" $mermaidLib) }} | ||
<script defer async type="module"> | ||
import mermaid from '{{ $mm }}'; | ||
mermaid.initialize({ {{ $mermaid_initialize | safeJS }} }); | ||
</script> | ||
{{- else -}} | ||
<script defer async type="module"> | ||
import mermaid from '{{ $mermaidLib }}'; | ||
mermaid.initialize({ {{ $mermaid_initialize | safeJS }} }); | ||
</script> | ||
{{- end -}} | ||
{{- end -}} | ||
{{- end -}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,7 +17,7 @@ features = [ | |
[module] | ||
[module.hugoVersion] | ||
extended = true | ||
min = '0.140' | ||
min = '0.140.0' | ||
|
||
|
||
[author] | ||
|