diff options
author | Daniel Saunders <10623666+funkydan2@users.noreply.github.com> | 2020-08-12 07:58:45 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-12 07:58:45 +0300 |
commit | ef524e6d2779156702b2e8f4c5b81651a3aebdd3 (patch) | |
tree | d9adefeb0ffbc5cfd01a94acbc06bd7012433360 | |
parent | 8d485ee83bf7c5efaab864631a67d396f9b63fc7 (diff) | |
parent | bfe20187ddc682a0dfc72c763fb7c5d8f613f1a7 (diff) |
Merge pull request #52 from residentlim/master
Added support for KaTeX (faster LaTeX rendering).
-rw-r--r-- | exampleSite/config.toml | 1 | ||||
-rw-r--r-- | layouts/partials/header_includes.html | 7 |
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 }} |