From 3fa25abce4417d117fa2c1c858616257a389b6b8 Mon Sep 17 00:00:00 2001 From: Samuel Proulx Date: Thu, 29 Dec 2022 06:52:53 -0500 Subject: [PATCH] Add mathjax and katex support (#75) * Add mathjax and katex support * update readme --- README.md | 2 ++ layouts/partials/header.html | 41 ++++++++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+) diff --git a/README.md b/README.md index abf9193..9da1ad9 100644 --- a/README.md +++ b/README.md @@ -79,6 +79,8 @@ paginate=3 # articles per page mode="auto" # color-mode → light,dark,toggle or auto useCDN=false # don't use CDNs for fonts and icons, instead serve them locally. subtitle = "Minimal and Clean [blog theme for Hugo](https://github.com/athul/archie)" + mathjax = true # enable MathJax support + katex = true # enable KaTeX support # Social Tags diff --git a/layouts/partials/header.html b/layouts/partials/header.html index f3c9e82..7d990d0 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -43,6 +43,47 @@ {{ $darkstyle := resources.Get "css/dark.css" | fingerprint }} {{ end }} + + + {{ with .Site.Params.mathjax }} + + + + + {{ end }} + + + {{ with .Site.Params.katex }} + + + + + + + {{ end }} {{- if isset .Site.Params "customcss" }}