Skip to content

Commit

Permalink
refactor(js): use relative URL for Mathjax config JS
Browse files Browse the repository at this point in the history
Works around potential multi-host asset Permalink bug in Hugo.

See HugoBlox#751
Close HugoBlox#757
  • Loading branch information
gcushen committed Oct 27, 2018
1 parent fa5de92 commit ab20e8f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion layouts/partials/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -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. */}}
Expand Down

0 comments on commit ab20e8f

Please sign in to comment.