Mathjax support added

Mathjax config options added.
`compress_html` config option changed,
Mathjax script loaded by head when `page.mathjax` is truthy.
Documentation and test page added.
See also issue #198.
This commit is contained in:
Peter Mosses
2019-08-31 23:19:03 +02:00
parent 4e65041849
commit 7220197a1f
5 changed files with 293 additions and 2 deletions

View File

@@ -29,7 +29,17 @@
{% if site.search_enabled != false %}
<script type="text/javascript" src="{{ '/assets/js/vendor/lunr.min.js' | absolute_url }}"></script>
{% endif %}
<script type="text/javascript" src="{{ '/assets/js/just-the-docs.js' | absolute_url }}"></script>
<script type="text/javascript" src="{{ '/assets/js/just-the-docs.js' | absolute_url }}"></script>
{% if page.mathjax %}
<script type="text/x-mathjax-config">
{{ site.mathjax.config }};
</script>
<script type="text/javascript" async
src="{{ site.mathjax.source }}">
</script>
{% endif %}
<meta name="viewport" content="width=device-width, initial-scale=1">