Load custom JS scripts if page specifies them
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
This commit is contained in:
parent
aae8912c08
commit
378a6f2ae1
|
@ -43,6 +43,12 @@
|
|||
{{ end }}
|
||||
<link rel="icon" type="image/png" href="{{ $icon.Permalink }}">
|
||||
|
||||
{{ if .Params.custom_js }}
|
||||
{{ range $customJs := .Params.custom_js }}
|
||||
<script src="{{ page.Resources.Get $customJs }}"></script>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ if hugo.IsServer }}
|
||||
<!-- KaTeX auto-rendering for when we don't have a post-processing step. -->
|
||||
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.16.0/dist/katex.min.js" integrity="sha384-X/XCfMm41VSsqRNQgDerQczD69XqmjOOOwYQvr/uuC+j4OPoNhVgjdGFwhvN02Ja" crossorigin="anonymous"></script>
|
||||
|
|
Loading…
Reference in New Issue
Block a user