Skip to content
This repository was archived by the owner on Mar 9, 2022. It is now read-only.

Commit

Permalink
Fix the formulas bug, make it inline possible (#17)
Browse files Browse the repository at this point in the history
Fix the formulas bug, make it inline possible
  • Loading branch information
dillonzq authored Jan 29, 2020
2 parents 4c53910 + b922d28 commit 088975a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
3 changes: 3 additions & 0 deletions layouts/partials/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
10 changes: 10 additions & 0 deletions layouts/partials/math.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<script>
document.addEventListener("DOMContentLoaded", function() {
renderMathInElement(document.body, {
delimiters: [
{left: "$$", right: "$$", display: true},
{left: "$", right: "$", display: false}
]
});
});
</script>

0 comments on commit 088975a

Please sign in to comment.