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

github.com/rmsubekti/the-roots-home.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRahmat Subekti <rahmatsubekti@live.com>2020-07-03 20:05:15 +0300
committerRahmat Subekti <rahmatsubekti@live.com>2020-07-03 20:05:15 +0300
commitf7f54a1abf5bff8c2a455588e8264f81118325d5 (patch)
treec8972b1f60c2337b1a8c962a0692af963c217e83
parent18a920532cdcce6a5d110e90388e3b0fe9fc46c5 (diff)
add latex support
-rw-r--r--layouts/partials/head.html1
-rw-r--r--layouts/partials/math.html6
2 files changed, 7 insertions, 0 deletions
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
index e82e453..9355e7d 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -29,4 +29,5 @@
{{ hugo.Generator}}
<script type="module" src="https://unpkg.com/ionicons@5.1.2/dist/ionicons/ionicons.esm.js"></script>
<script nomodule="" src="https://unpkg.com/ionicons@5.1.2/dist/ionicons/ionicons.js"></script>
+ {{ partial "math.html" . }}
</head>
diff --git a/layouts/partials/math.html b/layouts/partials/math.html
new file mode 100644
index 0000000..050d7fc
--- /dev/null
+++ b/layouts/partials/math.html
@@ -0,0 +1,6 @@
+{{ if or .Params.math .Site.Params.math }}
+<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.11.1/dist/katex.min.css" integrity="sha384-zB1R0rpPzHqg7Kpt0Aljp8JPLqbXI3bhnPWROx27a9N0Ll6ZP/+DiW/UqRcLbRjq" crossorigin="anonymous">
+<script defer src="https://cdn.jsdelivr.net/npm/katex@0.11.1/dist/katex.min.js" integrity="sha384-y23I5Q6l+B6vatafAwxRu/0oK/79VlbSz7Q9aiSZUvyWYIYsd+qj+o24G5ZU2zJz" crossorigin="anonymous"></script>
+<script defer src="https://cdn.jsdelivr.net/npm/katex@0.11.1/dist/contrib/auto-render.min.js" integrity="sha384-kWPLUVMOks5AQFrykwIup5lo0m3iMkkHrD0uJ4H5cjeGihAutqP0yW0J6dpFiVkI" crossorigin="anonymous"
+ onload="renderMathInElement(document.body);"></script>
+{{ end }} \ No newline at end of file