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

github.com/zwbetz-gh/cupper-hugo-theme.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzwbetz <zwbetz@gmail.com>2019-04-03 04:59:56 +0300
committerzwbetz <zwbetz@gmail.com>2019-04-03 04:59:56 +0300
commit31c33627e6ad76a89826f13d40e2911785f7cd87 (patch)
tree48d351c569e23ec18adcfcaf8c07765e748b54e1 /layouts
parentcc43fcbe7b06178cd0bb3d590cae4af29e872de2 (diff)
Add Katex support
Diffstat (limited to 'layouts')
-rw-r--r--layouts/_default/baseof.html1
-rw-r--r--layouts/partials/katex.html5
2 files changed, 6 insertions, 0 deletions
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
index 262b68e..f01fa3e 100644
--- a/layouts/_default/baseof.html
+++ b/layouts/_default/baseof.html
@@ -14,6 +14,7 @@
</div>
</div>
{{ partial "script.html" . }}
+ {{ partial "katex.html" . }}
{{ partial "google-analytics-async.html" . }}
</body>
</html>
diff --git a/layouts/partials/katex.html b/layouts/partials/katex.html
new file mode 100644
index 0000000..7410749
--- /dev/null
+++ b/layouts/partials/katex.html
@@ -0,0 +1,5 @@
+{{ if eq $.Site.Params.katex true }}
+<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.10.1/dist/katex.min.css" integrity="sha384-dbVIfZGuN1Yq7/1Ocstc1lUEm+AT+/rCkibIcC/OmWo5f0EA48Vf8CytHzGrSwbQ" crossorigin="anonymous">
+<script defer src="https://cdn.jsdelivr.net/npm/katex@0.10.1/dist/katex.min.js" integrity="sha384-2BKqo+exmr9su6dir+qCw08N2ZKRucY4PrGQPPWU1A7FtlCGjmEGFqXCv5nyM5Ij" crossorigin="anonymous"></script>
+<script defer src="https://cdn.jsdelivr.net/npm/katex@0.10.1/dist/contrib/auto-render.min.js" integrity="sha384-kWPLUVMOks5AQFrykwIup5lo0m3iMkkHrD0uJ4H5cjeGihAutqP0yW0J6dpFiVkI" crossorigin="anonymous" onload="renderMathInElement(document.body);"></script>
+{{ end }} \ No newline at end of file