[python-dtcwt] 249/497: add specialised mathjax CDN URL for readthedocs

Ghislain Vaillant ghisvail-guest at moszumanska.debian.org
Tue Jul 21 18:06:11 UTC 2015


This is an automated email from the git hooks/post-receive script.

ghisvail-guest pushed a commit to branch debian/sid
in repository python-dtcwt.

commit 41fa0d0d8355f5aa503052a90933b4b092614eea
Author: Rich Wareham <rjw57 at cam.ac.uk>
Date:   Tue Jan 28 10:36:30 2014 +0000

    add specialised mathjax CDN URL for readthedocs
    
    RTD serves documentation over HTTPS which means that Chrome refuses to
    load JavaScript over HTTP. When compiling under RTD, change the MathJax
    CDN URL as noted in [1].
    
    [1] http://docs.mathjax.org/en/latest/start.html#secure-access-to-the-cdn
---
 docs/conf.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/docs/conf.py b/docs/conf.py
index c859875..ff10335 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -169,6 +169,10 @@ html_static_path = ['_static']
 # Output file base name for HTML help builder.
 htmlhelp_basename = 'dtcwtdoc'
 
+# On read the docs we need to use a different CDN URL for MathJax which loads
+# over HTTPS or HTTP depending on how the page loads.
+if os.environ.get('READTHEDOCS', None) == 'True':
+    mathjax_path = 'https://c328740.ssl.cf1.rackcdn.com/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'
 
 # -- Options for LaTeX output --------------------------------------------------
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/python-dtcwt.git



More information about the debian-science-commits mailing list