Skip to content

Commit

Permalink
KaTeX resource optimizations
Browse files Browse the repository at this point in the history
Allow KaTeX to load only for "post" pages (post as layout)
  • Loading branch information
saojeda authored Jun 5, 2018
1 parent ad234dd commit d168903
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions _includes/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@
{% endif %}

<!-- KaTeX -->
{% if site.theme_settings.katex %}
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/KaTeX/0.8.3/katex.min.css">
<script src="//cdnjs.cloudflare.com/ajax/libs/KaTeX/0.8.3/katex.min.js"></script>
{% if site.theme_settings.katex and page.id %}
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css" integrity="sha384-BTL0nVi8DnMrNdMQZG1Ww6yasK9ZGnUxL1ZWukXQ7fygA1py52yPp9W4wrR00VML" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.js" integrity="sha384-y6SGsNt7yZECc4Pf86XmQhC4hG2wxL6Upkt9N1efhFxfh6wlxBH0mJiTE8XYclC1" crossorigin="anonymous"></script>
{% endif %}

<!-- Google Analytics -->
Expand Down

0 comments on commit d168903

Please sign in to comment.