diff options
author | Zian Chi <zianchi@outlook.com> | 2018-08-31 01:10:58 +0300 |
---|---|---|
committer | Zian Chi <zianchi@outlook.com> | 2018-08-31 01:10:58 +0300 |
commit | 0e951f31d28624e318f69154482c540b30106eec (patch) | |
tree | 30eaa94c3fc4a395ad797a498277ca4d6bc95cce | |
parent | b0ea3b563108fc9bd0ecc673e06cfa8f3104b3bd (diff) |
add KaTex and enable auto-render
-rw-r--r-- | layouts/partials/head_custom.html | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/layouts/partials/head_custom.html b/layouts/partials/head_custom.html index 6520ca0..113ca35 100644 --- a/layouts/partials/head_custom.html +++ b/layouts/partials/head_custom.html @@ -1,4 +1,12 @@ -<header> +<!-- KaTeX --> + <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.10.0-rc.1/dist/katex.min.css" integrity="sha384-D+9gmBxUQogRLqvARvNLmA9hS2x//eK1FhVb9PiU86gmcrBrJAQT8okdJ4LMp2uv" crossorigin="anonymous"> + <script defer src="https://cdn.jsdelivr.net/npm/katex@0.10.0-rc.1/dist/katex.min.js" integrity="sha384-483A6DwYfKeDa0Q52fJmxFXkcPCFfnXMoXblOkJ4JcA8zATN6Tm78UNL72AKk+0O" crossorigin="anonymous"></script> + <script defer src="https://cdn.jsdelivr.net/npm/katex@0.10.0-rc.1/dist/contrib/auto-render.min.js" integrity="sha384-yACMu8JWxKzSp/C1YV86pzGiQ/l1YUfE8oPuahJQxzehAjEt2GiQuy/BIvl9KyeF" crossorigin="anonymous"></script> + <script> + document.addEventListener("DOMContentLoaded", function() { + renderMathInElement(document.body); + }); + </script><header> <!-- Syntax highlighting - defaults to atom light theme. |