Parcourir la source

Express local for MathJax path

Jessica Lawshe il y a 8 ans
Parent
commit
90986c1ade
1 fichiers modifiés avec 5 ajouts et 0 suppressions
  1. 5 0
      services/web/app/coffee/infrastructure/ExpressLocals.coffee

+ 5 - 0
services/web/app/coffee/infrastructure/ExpressLocals.coffee

@@ -167,6 +167,11 @@ module.exports = (app, webRouter, privateApiRouter, publicApiRouter)->
 			path = Path.join("/img/", imgFile)
 			path = Path.join("/img/", imgFile)
 			return Url.resolve(staticFilesBase, path)
 			return Url.resolve(staticFilesBase, path)
 
 
+		res.locals.mathJaxPath = res.locals.buildJsPath(
+			'libs/mathjax/MathJax.js',
+			{cdn:false, qs:{config:'TeX-AMS_HTML'}}
+		)
+
 		next()
 		next()