Fix the formulas bug, make it inline possible (#17)

Fix the formulas bug, make it inline possible
This commit is contained in:
Dillon 2020-01-29 18:58:55 +08:00 committed by GitHub
commit 088975a8bb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 0 deletions

View file

@ -54,3 +54,6 @@
{{ $res := resources.Get "css/lib/animate/animate.min.css" | resources.Minify -}}
<link rel="stylesheet" href="{{ $res.RelPermalink }}">
{{ end }}
{{ if or .Params.math .Site.Params.math }}
{{ partial "math.html" . }}
{{ end }}

View file

@ -0,0 +1,10 @@
<script>
document.addEventListener("DOMContentLoaded", function() {
renderMathInElement(document.body, {
delimiters: [
{left: "$$", right: "$$", display: true},
{left: "$", right: "$", display: false}
]
});
});
</script>