Skip to content

Commit

Permalink
Speedup MathJax loading FLR-139
Browse files Browse the repository at this point in the history
  • Loading branch information
swarna1101 committed Jul 22, 2024
1 parent a4232fe commit afc7e34
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 9 deletions.
6 changes: 1 addition & 5 deletions docs/assets/javascripts/mathjax.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,4 @@ window.MathJax = {
ignoreHtmlClass: ".*|",
processHtmlClass: "arithmatex"
}
};

document$.subscribe(() => {
MathJax.typesetPromise()
})
};
7 changes: 6 additions & 1 deletion docs/assets/overrides/main.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@
<meta property="og:title" content="{{ page.title }}" />
<meta property="og:description" content="{{ page.meta.og_description }}" />
{% endif %}
{% if page.meta.mathjax %}
<script type="text/javascript" src="/assets/javascripts/mathjax.js"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
{% endif %}

{% endblock %}

{% block header %}
Expand All @@ -18,4 +23,4 @@
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->
{{ super() }}
{% endblock %}
{% endblock %}
1 change: 1 addition & 0 deletions docs/tech/fassets/collateral.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: Collateral
mathjax: true
search:
boost: 2
---
Expand Down
1 change: 1 addition & 0 deletions docs/tech/fassets/liquidation.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: Liquidation
mathjax: true
search:
boost: 2
---
Expand Down
4 changes: 1 addition & 3 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -253,10 +253,8 @@ plugins:
extra_css:
- assets/stylesheets/extra.css
extra_javascript:
- assets/javascripts/mathjax.js
- assets/javascripts/images.js
- assets/javascripts/links.js
- https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js
extra:
social:
- icon: fontawesome/brands/linkedin
Expand Down Expand Up @@ -377,4 +375,4 @@ nav:
- infra/observation/deploying-docker.md
- Validator Nodes:
- infra/validation/index.md
- infra/validation/deploying.md
- infra/validation/deploying.md

0 comments on commit afc7e34

Please sign in to comment.