hackertours-theme/layouts/partials/math.html
Jason Li 1b82c48add
Add math typesetting support with KaTex (#80)
* add math typesetting support with KaTex
* Simplified the syntax for checking "math" property
* save katex files to local
* use local katex file to render math typesetting
* revert changes in scripts.html and styles.html
* Save math.js as a file, not inline script.
* move it into "assets/js" folder
* Load all necessary scripts and styles in math.html
2023-03-17 13:50:57 +01:00

11 lines
574 B
HTML

{{ $katex_style := resources.Get "vendor/katex/katex.min.css" -}}
<link rel="stylesheet" href="{{ $katex_style.RelPermalink }}" >
{{ $katex := resources.Get "vendor/katex/katex.min.js" }}
<script defer src="{{ $katex.RelPermalink }}" crossorigin="anonymous"></script>
{{ $auto_render := resources.Get "vendor/katex/auto-render.min.js" }}
<script defer src="{{ $auto_render.RelPermalink }}" crossorigin="anonymous"></script>
{{ $customized_render := resources.Get "js/math.js" }}
<script defer src="{{ $customized_render.RelPermalink }}" crossorigin="anonymous"></script>