From 8aac26a42b9f6a6c887633be443812016c14da28 Mon Sep 17 00:00:00 2001 From: Chuyang Chen Date: Fri, 10 Jun 2022 22:01:20 +0800 Subject: [PATCH] Add support for MathJax --- assets/css/main.css | 7 +++++++ layouts/partials/header.html | 2 ++ layouts/partials/mathjax_support.html | 22 ++++++++++++++++++++++ 3 files changed, 31 insertions(+) create mode 100644 layouts/partials/mathjax_support.html diff --git a/assets/css/main.css b/assets/css/main.css index ce6a21f..a57c17b 100644 --- a/assets/css/main.css +++ b/assets/css/main.css @@ -508,6 +508,13 @@ article figcaption { margin-bottom: 2em; } +code.has-jax { + -webkit-font-smoothing: antialiased; + background: inherit !important; + border: none !important; + font-size: 100%; +} + .read-more { margin: 1em 0; } diff --git a/layouts/partials/header.html b/layouts/partials/header.html index e808edf..eb4af00 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -13,4 +13,6 @@ {{ end }} +{{ if .Site.Params.mathjax }}{{ partial "mathjax_support.html" . }}{{ end }} + {{ partial "header-extra.html" . }} diff --git a/layouts/partials/mathjax_support.html b/layouts/partials/mathjax_support.html new file mode 100644 index 0000000..0dc7dd1 --- /dev/null +++ b/layouts/partials/mathjax_support.html @@ -0,0 +1,22 @@ + + + \ No newline at end of file