From fdc70dd5a7f06a71da2eee1e8e713a16796df5d7 Mon Sep 17 00:00:00 2001 From: Tomas Babej Date: Fri, 5 May 2017 18:05:41 +0200 Subject: [PATCH] Use MathJax hosted at cdnjs if local mathjax file is not available MathJax shut their CDN down on April 30, 2017. See: https://www.mathjax.org/cdn-shutting-down/ --- django_mathjax/templatetags/mathjax.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/django_mathjax/templatetags/mathjax.py b/django_mathjax/templatetags/mathjax.py index 280a23e..dd8236b 100644 --- a/django_mathjax/templatetags/mathjax.py +++ b/django_mathjax/templatetags/mathjax.py @@ -17,7 +17,7 @@ def mathjax_scripts(): if mathjax_local_path: mathjax_js_url = static('%s/MathJax.js' % mathjax_local_path) else: - mathjax_js_url = '//cdn.mathjax.org/mathjax/latest/MathJax.js' + mathjax_js_url = '//cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js' mathjax_config_file = getattr(settings, 'MATHJAX_CONFIG_FILE', "TeX-AMS-MML_HTMLorMML") url = "%s?config=%s" % (mathjax_js_url, mathjax_config_file)