mirror of
https://github.com/carsonip/hugo-theme-minos
synced 2025-12-29 19:09:50 -08:00
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 43684e6181.
* Fix description about KaTeX post param
This commit is contained in:
@@ -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!
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user