diff --git a/index.js b/index.js index 3c9b9f4..307c4fc 100644 --- a/index.js +++ b/index.js @@ -3,7 +3,7 @@ var fs = require('fs'); var path = require('path'); var crc = require('crc'); var exec = require('child_process').exec; -var mjAPI = require('mathjax-node/lib/mj-single.js'); +var mjAPI = require('mathjax-node/lib/main.js'); var started = false; var countMath = 0; @@ -118,12 +118,12 @@ function processBlock(blk) { @return {Object} */ function getWebsiteAssets() { - var version = this.config.get('pluginsConfig.mathjax.version', 'latest'); + var version = this.config.get('pluginsConfig.mathjax.version', '2.7.6'); return { assets: "./book", js: [ - 'https://cdn.mathjax.org/mathjax/' + version + '/MathJax.js?config=TeX-AMS-MML_HTMLorMML', + 'https://cdnjs.cloudflare.com/ajax/libs/mathjax/' + version + '/MathJax.js?config=TeX-AMS-MML_HTMLorMML', 'plugin.js' ] }; diff --git a/package.json b/package.json index a5bb3fc..7220099 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "gitbook": ">=3.0.0" }, "dependencies": { - "mathjax-node": "0.5.2", + "mathjax-node": "1.3.0", "q": "^1.1.2", "crc": "^3.2.1" }, @@ -31,7 +31,7 @@ "version": { "type": "string", "title": "Version of MathJAX to use for website rendering", - "default": "2.6-latest" + "default": "2.7.6" } } }