Skip to content

Commit

Permalink
bundle auto-render and copy-tex
Browse files Browse the repository at this point in the history
  • Loading branch information
HidegonSan committed Dec 1, 2023
1 parent cd7149b commit d2450a5
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions layouts/partials/head/katex.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,18 +40,19 @@
{{- end -}}
{{- end -}}

{{- -}}
{{- with (slice $katex_license_js (resources.Get "js/katex/contrib/auto-render.min.js")) | resources.Concat "assets/js/katex/contrib/auto-render.min.js" | fingerprint -}}
<script
defer
crossorigin="anonymous"
type="module"
src="{{- .RelPermalink -}}"
integrity="{{- .Data.Integrity -}}"
></script>
{{- end -}}
{{- $auto_render_js := resources.Get "js/katex/contrib/auto-render.min.js" -}}
{{- $copy_tex_js := resources.Get "js/katex/contrib/copy-tex.min.js" -}}

{{- $auto_render_and_copy_tex_js := (
slice
$katex_license_js
$auto_render_js
$copy_tex_js
)
| resources.Concat "assets/js/katex/contrib/auto-render-and-copy-tex.min.js"
-}}

{{- with (slice $katex_license_js (resources.Get "js/katex/contrib/copy-tex.min.js")) | resources.Concat "assets/js/katex/contrib/copy-tex.min.js" | fingerprint -}}
{{- with $auto_render_and_copy_tex_js | fingerprint -}}
<script
defer
crossorigin="anonymous"
Expand Down

0 comments on commit d2450a5

Please sign in to comment.