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

github.com/carsonip/hugo-theme-minos.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShiva Huang <shiva.tw@gmail.com>2019-03-25 18:43:53 +0300
committerCarson Ip <carsonip@users.noreply.github.com>2019-03-25 18:43:53 +0300
commitcb81cd0ae915ccae316322b6d779adf1c91d3dbc (patch)
tree44da52a95fb55d9830ca678ac9c445d97d3540a6
parentd88882e5c2ea832042af601aae29faa0fa89d48d (diff)
Enhance KaTeX (#26)
* Use `.Param` as switch of KaTeX. This make you to decide to enable KaTeX for whole site or for single post. * Enable rendering KaTeX in code block. * Revert "Enable rendering KaTeX in code block." This reverts commit 43684e61815f7332c95f2f02a10643e4e3fdc77a. * Fix description about KaTeX post param
-rw-r--r--README.md8
-rw-r--r--layouts/partials/footer.html2
2 files changed, 9 insertions, 1 deletions
diff --git a/README.md b/README.md
index 38da9a4..b559747 100644
--- a/README.md
+++ b/README.md
@@ -91,6 +91,14 @@ hidden = true
+++
```
+### Enable KaTeX for this post
+Enable KaTeX for a specific post without enabling the global switch.
+```
++++
+katex = true
++++
+```
+
## Contributing
1. Fork it!
diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html
index ac3795a..475b6f6 100644
--- a/layouts/partials/footer.html
+++ b/layouts/partials/footer.html
@@ -12,7 +12,7 @@
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.9.0/highlight.min.js" integrity="sha256-KbfTjB0WZ8vvXngdpJGY3Yp3xKk+tttbqClO11anCIU=" crossorigin="anonymous"></script>
<script>hljs.initHighlightingOnLoad();</script>
- {{ if .Site.Params.Katex }}
+ {{ if $.Param "katex" }}
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.7.1/katex.min.css" integrity="sha384-wITovz90syo1dJWVh32uuETPVEtGigN07tkttEqPv+uR2SE/mbQcG7ATL28aI9H0" crossorigin="anonymous">
<script src="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.7.1/katex.min.js" integrity="sha384-/y1Nn9+QQAipbNQWU65krzJralCnuOasHncUFXGkdwntGeSvQicrYkiUBwsgUqc1" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.7.1/contrib/auto-render.min.js" integrity="sha256-ExtbCSBuYA7kq1Pz362ibde9nnsHYPt6JxuxYeZbU+c=" crossorigin="anonymous"></script>