Skip to content
Snippets Groups Projects
Commit a696ebdc authored by Eduardo Trujillo's avatar Eduardo Trujillo
Browse files

refactor(MathJax): Serve from blog server rather than using outdated CDN

parent 6d79d490
No related branches found
No related tags found
No related merge requests found
......@@ -7,3 +7,6 @@
[submodule "third_party/foundation-sites"]
path = third_party/foundation-sites
url = https://github.com/zurb/foundation-sites.git
[submodule "third_party/mathjax"]
path = third_party/mathjax
url = https://github.com/mathjax/MathJax.git
......@@ -91,6 +91,12 @@ main = hakyllServeWith serveConf $ do
match "third_party/font-awesome/fonts/*" $ do
route $ gsubRoute "third_party/font-awesome/" (const "")
compile copyFileCompiler
mapM_ matchThirdPartyJSAndCopy
[ "third_party/mathjax/MathJax.js"
, "third_party/mathjax/config/**"
, "third_party/mathjax/extensions/**"
, "third_party/mathjax/jax/**"
]
create ["scss/app.scss"] $ do
route $ gsubRoute "scss/" (const "css/") `composeRoutes` setExtension "css"
......@@ -332,6 +338,11 @@ matchAndCopy (path, extension) = match path $ do
route $ dropContentPrefix `composeRoutes` setExtension extension
compile copyFileCompiler
matchThirdPartyJSAndCopy :: Pattern -> Rules ()
matchThirdPartyJSAndCopy dir = match dir $ do
route $ gsubRoute "third_party/" (const "js/")
compile copyFileCompiler
-- IDENTIFIER HELPERS ---------------------------------------------------------
grouper :: MonadMetadata m => [Identifier] -> m [[Identifier]]
......
......@@ -119,7 +119,7 @@
</div>
<script async type="text/javascript"
src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
src="/js/mathjax/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>
</body>
</html>
Subproject commit 82590066f9cc3561d4a6b6355ce82af324cb161d
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment