From d07bc85e6f8b8c2e070d25d64ff3f7d34b89226f Mon Sep 17 00:00:00 2001 From: Palash Bauri Date: Fri, 28 Apr 2023 10:55:59 +0530 Subject: [PATCH] added math/katex support --- config.toml | 1 + hugo_stats.json | 4 +++- themes/x/layouts/_default/baseof.html | 1 + themes/x/layouts/partials/extras/math.html | 26 ++++++++++++++++++++++ 4 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 themes/x/layouts/partials/extras/math.html diff --git a/config.toml b/config.toml index b812cef..e8aab2a 100644 --- a/config.toml +++ b/config.toml @@ -122,6 +122,7 @@ language = "en" env = "development" enablegoat = true mermaid = true + math = true description = "Ideas, criticism, thoughts of Palash Bauri" author = "Palash Bauri" mainSections = "posts" diff --git a/hugo_stats.json b/hugo_stats.json index 24e5b57..f564a8a 100644 --- a/hugo_stats.json +++ b/hugo_stats.json @@ -55,7 +55,6 @@ "highlight", "home-info", "indicator", - "mastodon-container", "mastodon-embed", "myinfo", "next-post", @@ -107,9 +106,12 @@ "hi--আম-পলশ-বউর", "hi-i-am-palash-bauri", "i-want-freedom", + "india", "little-extra", "masto_share", "new-gpg-public-key-of-gmail-email-account", + "note-taking", + "pankti-programming-language", "personal-updates", "some-blogs-i--read-", "দশহন--মতয", diff --git a/themes/x/layouts/_default/baseof.html b/themes/x/layouts/_default/baseof.html index 11d1131..11d8c59 100644 --- a/themes/x/layouts/_default/baseof.html +++ b/themes/x/layouts/_default/baseof.html @@ -11,6 +11,7 @@ {{- partial "extras/mermaid.html" . -}} + {{- partial "extras/math.html" . -}} {{ if $.Site.Params.Enablegoat }} diff --git a/themes/x/layouts/partials/extras/math.html b/themes/x/layouts/partials/extras/math.html new file mode 100644 index 0000000..a5eef3d --- /dev/null +++ b/themes/x/layouts/partials/extras/math.html @@ -0,0 +1,26 @@ +{{ if $.Site.Params.Math }} + {{ if .Page.Params.Math }} + + + + + + + + + + + {{ end }} +{{ end }}