Fixed math in pages

This commit is contained in:
2020-09-24 23:28:57 +02:00
parent b1d295543f
commit 5e522a3d3c
3 changed files with 47 additions and 3 deletions

View File

@@ -18,6 +18,7 @@
<meta name="theme-color" content="#ffffff">
{% seo %}
<link rel="stylesheet" href="{{ "/assets/css/style.css?v=" | relative_url }}">
<!--[if lt IE 9]>
<script src="https://cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv.min.js"></script>
@@ -32,7 +33,7 @@
<img src="{{site.logo | relative_url}}" alt="Logo" />
{% endif %}
<p>{{ site.description_long | default: site.github.project_tagline }}</p>
<p>{{ site.description_long }}</p>
{% if site.github.is_project_page %}
<p class="view"><a href="{{ site.github.repository_url }}">Vis kilden på min private git <small>{{ site.github.repository_nwo }}</small></a></p>
@@ -73,5 +74,28 @@
ga('send', 'pageview');
</script>
{% endif %}
{% if page.math %}
<script>
MathJax = {
tex: {
packages: {
'[+]': ['mhchem', 'ams']
},
inlineMath: [ // start/end delimiter pairs for in-line math
['$','$'],
['\\(', '\\)']
],
displayMath: [ // start/end delimiter pairs for display math
['$$', '$$'],
['\\[', '\\]']
],
tags: 'ams',
processRefs: true,
}
};
</script>
<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js"></script>
{% endif %}
</body>
</html>