Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/funkydan2/hugo-kiera.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Lim <ryanlimyx@hotmail.com>2020-08-12 04:58:24 +0300
committerRyan Lim <ryanlimyx@hotmail.com>2020-08-12 04:58:24 +0300
commitbfe20187ddc682a0dfc72c763fb7c5d8f613f1a7 (patch)
treed9adefeb0ffbc5cfd01a94acbc06bd7012433360
parent8d485ee83bf7c5efaab864631a67d396f9b63fc7 (diff)
Added support for Katex (faster LaTeX rendering).
-rw-r--r--exampleSite/config.toml1
-rw-r--r--layouts/partials/header_includes.html7
2 files changed, 8 insertions, 0 deletions
diff --git a/exampleSite/config.toml b/exampleSite/config.toml
index 278e60b..9c6554d 100644
--- a/exampleSite/config.toml
+++ b/exampleSite/config.toml
@@ -36,6 +36,7 @@ pygmentsCodeFences = true
#homepageLength = 10
#commentAutoload = true #This mean reader don't need click, disqus comment autoload
#mathjax = true #Enable display of mathematics using mathjax (LaTeX syntax)
+ #katex = true #Enable display of mathematics using katex (Faster LaTeX rendering)
#google_fonts = ["Staatliches"] # Adds additional google fonts
#disableDarkModeCSS = false # disables css style for users using dark-mode
diff --git a/layouts/partials/header_includes.html b/layouts/partials/header_includes.html
index 87f948d..97ef312 100644
--- a/layouts/partials/header_includes.html
+++ b/layouts/partials/header_includes.html
@@ -8,6 +8,13 @@
<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
{{- end }}
+ {{- if .Site.Params.katex }}
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.12.0/dist/katex.min.css" integrity="sha384-AfEj0r4/OFrOo5t7NnNe46zW/tFgW6x/bCJG8FqQCEo3+Aro6EYUG4+cU+KJWu/X" crossorigin="anonymous">
+ <script defer src="https://cdn.jsdelivr.net/npm/katex@0.12.0/dist/katex.min.js" integrity="sha384-g7c+Jr9ZivxKLnZTDUhnkOnsh30B4H0rpLUpJ4jAIKs4fnJI+sEnkvrMWph2EDg4" crossorigin="anonymous"></script>
+ <script defer src="https://cdn.jsdelivr.net/npm/katex@0.12.0/dist/contrib/auto-render.min.js" integrity="sha384-mll67QQFJfxn0IYznZYonOWZ644AWYC+Pt2cHqMaRhXVrursRwvLnLaebdGIlYNa" crossorigin="anonymous"
+ onload="renderMathInElement(document.body);"></script>
+ {{- end }}
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/8.0.1/normalize.min.css" integrity="sha256-l85OmPOjvil/SOvVt3HnSSjzF1TUMyT9eV0c2BzEGzU=" crossorigin="anonymous" />
<link rel="stylesheet" href="{{ "fontawesome/css/all.min.css" | absURL }}" />
{{ if .Site.Params.google_fonts }}