Add Katex support for displaying math
This commit is contained in:
@ -9,6 +9,22 @@
|
||||
{%- endif %}
|
||||
<title>{% include "partials/title.html" %}</title>
|
||||
<link rel="canonical" href="{{ current_url | default(value='/') | safe }}" />
|
||||
|
||||
{%- if config.extra.katex %}
|
||||
<link rel="stylesheet" href="{{ get_url(path="katex.css") }}">
|
||||
<script defer src="{{ get_url(path="katex.js")}}"></script>
|
||||
<script defer src="{{ get_url(path="auto-render.js") }}"></script>
|
||||
<script>
|
||||
document.addEventListener("DOMContentLoaded", function() {
|
||||
renderMathInElement(document.body, {
|
||||
delimiters: [
|
||||
{left: "$$", right: "$$", display: true},
|
||||
{left: "$", right: "$", display: false},
|
||||
]
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{%- endif %}
|
||||
|
||||
{%- if config.markdown.highlight_code and config.markdown.highlight_theme == "css" %}
|
||||
{%- if config.markdown.highlight_themes_css | length > 0 %}
|
||||
|
Reference in New Issue
Block a user