added math/katex support
This commit is contained in:
parent
501a1d0775
commit
d07bc85e6f
|
@ -122,6 +122,7 @@ language = "en"
|
||||||
env = "development"
|
env = "development"
|
||||||
enablegoat = true
|
enablegoat = true
|
||||||
mermaid = true
|
mermaid = true
|
||||||
|
math = true
|
||||||
description = "Ideas, criticism, thoughts of Palash Bauri"
|
description = "Ideas, criticism, thoughts of Palash Bauri"
|
||||||
author = "Palash Bauri"
|
author = "Palash Bauri"
|
||||||
mainSections = "posts"
|
mainSections = "posts"
|
||||||
|
|
|
@ -55,7 +55,6 @@
|
||||||
"highlight",
|
"highlight",
|
||||||
"home-info",
|
"home-info",
|
||||||
"indicator",
|
"indicator",
|
||||||
"mastodon-container",
|
|
||||||
"mastodon-embed",
|
"mastodon-embed",
|
||||||
"myinfo",
|
"myinfo",
|
||||||
"next-post",
|
"next-post",
|
||||||
|
@ -107,9 +106,12 @@
|
||||||
"hi--আম-পলশ-বউর",
|
"hi--আম-পলশ-বউর",
|
||||||
"hi-i-am-palash-bauri",
|
"hi-i-am-palash-bauri",
|
||||||
"i-want-freedom",
|
"i-want-freedom",
|
||||||
|
"india",
|
||||||
"little-extra",
|
"little-extra",
|
||||||
"masto_share",
|
"masto_share",
|
||||||
"new-gpg-public-key-of-gmail-email-account",
|
"new-gpg-public-key-of-gmail-email-account",
|
||||||
|
"note-taking",
|
||||||
|
"pankti-programming-language",
|
||||||
"personal-updates",
|
"personal-updates",
|
||||||
"some-blogs-i--read-",
|
"some-blogs-i--read-",
|
||||||
"দশহন--মতয",
|
"দশহন--মতয",
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
{{- partial "extras/mermaid.html" . -}}
|
{{- partial "extras/mermaid.html" . -}}
|
||||||
|
{{- partial "extras/math.html" . -}}
|
||||||
|
|
||||||
{{ if $.Site.Params.Enablegoat }}
|
{{ if $.Site.Params.Enablegoat }}
|
||||||
<script data-goatcounter="https://aopalash.goatcounter.com/count" async src="//gc.zgo.at/count.js"></script>
|
<script data-goatcounter="https://aopalash.goatcounter.com/count" async src="//gc.zgo.at/count.js"></script>
|
||||||
|
|
|
@ -0,0 +1,26 @@
|
||||||
|
{{ if $.Site.Params.Math }}
|
||||||
|
{{ if .Page.Params.Math }}
|
||||||
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.6/dist/katex.min.css" integrity="sha384-mXD7x5S50Ko38scHSnD4egvoExgMPbrseZorkbE49evAfv9nNcbrXJ8LLNsDgh9d" crossorigin="anonymous">
|
||||||
|
|
||||||
|
<!-- The loading of KaTeX is deferred to speed up page rendering -->
|
||||||
|
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.16.6/dist/katex.min.js" integrity="sha384-j/ZricySXBnNMJy9meJCtyXTKMhIJ42heyr7oAdxTDBy/CYA9hzpMo+YTNV5C+1X" crossorigin="anonymous"></script>
|
||||||
|
|
||||||
|
<!-- To automatically render math in text elements, include the auto-render extension: -->
|
||||||
|
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.16.6/dist/contrib/auto-render.min.js" integrity="sha384-+VBxd3r6XgURycqtZ117nYw44OOcIax56Z4dCRWbxyPt0Koah1uHoK0o4+/RRE05" crossorigin="anonymous"></script>
|
||||||
|
|
||||||
|
|
||||||
|
<script>
|
||||||
|
document.addEventListener("DOMContentLoaded", function() {
|
||||||
|
renderMathInElement(document.body, {
|
||||||
|
|
||||||
|
delimiters: [
|
||||||
|
{left: "$$", right: "$$", display: true},
|
||||||
|
{left: "$", right: "$", display: false}
|
||||||
|
],
|
||||||
|
strict : false,
|
||||||
|
trust : true,
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
Loading…
Reference in New Issue