Browse Source

refactor(js): use relative URL for Mathjax config JS

Works around potential multi-host asset Permalink bug in Hugo.

See #751
Close #757
George Cushen 6 years ago
parent
commit
ab20e8f9f2
1 changed files with 1 additions and 1 deletions
  1. 1 1
      layouts/partials/footer.html

+ 1 - 1
layouts/partials/footer.html

@@ -4,7 +4,7 @@
     {{ if or .Params.math .Site.Params.math }}
     {{ $mathjax_config := resources.Get "js/mathjax-config.js" }}
     {{ $secureJS := $mathjax_config | resources.Fingerprint "sha512" }}
-    <script src="{{ $secureJS.Permalink }}" integrity="{{ $secureJS.Data.Integrity }}"></script>
+    <script src="{{ $secureJS.RelPermalink }}" integrity="{{ $secureJS.Data.Integrity }}"></script>
     {{ end }}
 
     {{/* Attempt to load local vendor JS, otherwise load from CDN. */}}