cdn.mathjax.org has been retired and needs to migrated
cdn urls are hardcoded in pandoc.hs and trypandoc.hs and need to be updated
Maybe this is the right time to make them locally servable by a command line flag to make sure they depend on any provider but on your own server/local file if you want to stay independent from a CDN in general. This suggestion applies to any other externally called source.
The --mathjax option already takes an optional argument, so you can provide any URL you like.
The hardcoded one is just a default.
Also, note that (in the dev version) we have already switched to using https://cdnjs.cloudflare.com/ as the default.
I don't think the migration has been completed. Checking my local HEAD repos, I still see at least 3 uses of cdn.mathjax.org:
./pandoc/trypandoc/trypandoc.hs:59: writerHTMLMathMethod = MathJax "http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML",
./texmath/cgi/texmath.html:17: <script type="text/javascript" src="//cdn.mathjax.org/mathjax/latest/MathJax.js"></script>
./gitit/data/default.conf:87:mathjax-script: https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML
Thanks @gwern.
I'm testing to migrate to the new CDN. I found that it will breaks the legacy support of MathJax 3rd party extensions. Since MathJax has implemented a redirection from the original CDN, which makes the legacy 3rd party extensions still usable, using the original CDN will be better for compatibility.
Given how wide-spread the MathJax CDN was, and how slow people will update their codes (including the 3rd party extensions authors to update their codes, and the users to update the code to retrieve such extensions), I doubt this redirection would be terminated very soon.
So normally I'd like to stay up-to-date, but in this case I actually suggest we stick with the original CDN and rely on its redirection, at least until they provide a better path for MathJax 3rd party extensions to seamless migrate without breaking many webpages.
And it seems that the recommended CDN (cloudflare) does not support pointing to the "latest" variants. So even if we move away from the MathJax CDN, we might consider using jsdelivr instead, which has a mechanism to point to latest. While pointing to latest has its drawbacks, pandoc in the past does point to the latest MathJax. And since MathJax is pretty backward compatible, pointing to latest often means "free upgrade" people's math eq. on their website than breaking it.
Most helpful comment
The
--mathjaxoption already takes an optional argument, so you can provide any URL you like.The hardcoded one is just a default.
Also, note that (in the dev version) we have already switched to using https://cdnjs.cloudflare.com/ as the default.