diff options
Diffstat (limited to 'nikola/data/themes/base/templates/index_helper.tmpl')
| -rw-r--r-- | nikola/data/themes/base/templates/index_helper.tmpl | 31 |
1 files changed, 3 insertions, 28 deletions
diff --git a/nikola/data/themes/base/templates/index_helper.tmpl b/nikola/data/themes/base/templates/index_helper.tmpl index 0e98016..e400e3b 100644 --- a/nikola/data/themes/base/templates/index_helper.tmpl +++ b/nikola/data/themes/base/templates/index_helper.tmpl @@ -1,4 +1,5 @@ ## -*- coding: utf-8 -*- +<%namespace name="math" file="math_helper.tmpl"/> <%def name="html_pager()"> %if prevlink or nextlink: <nav class="postindexpager"> @@ -18,33 +19,7 @@ %endif </%def> +### This function is deprecated; use math_helper directly. <%def name="mathjax_script(posts)"> - %if any(post.is_mathjax for post in posts): - %if use_katex: - <script src="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.6.0/katex.min.js"></script> - <script src="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.6.0/contrib/auto-render.min.js"></script> - % if katex_auto_render: - <script> - renderMathInElement(document.body, - { - ${katex_auto_render} - } - ); - </script> - % else: - <script> - renderMathInElement(document.body); - </script> - % endif - %else: - <script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"> </script> - % if mathjax_config: - ${mathjax_config} - % else: - <script type="text/x-mathjax-config"> - MathJax.Hub.Config({tex2jax: {inlineMath: [['$latex ','$'], ['\\(','\\)']]}}); - </script> - % endif - %endif - %endif + ${math.math_scripts_ifposts(posts)} </%def> |
