feat(layout): minify script (#258)

Patch taken from 60633a072e
This commit is contained in:
Florian La Roche 2020-05-06 03:05:09 +02:00 committed by GitHub
parent 18fa0b5290
commit 50aa3f8d55
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -69,7 +69,7 @@
{{- end }} {{- end }}
{{ $even := resources.Get "js/even.js" }} {{ $even := resources.Get "js/even.js" }}
{{ $main := resources.Get "js/main.js" }} {{ $main := resources.Get "js/main.js" }}
{{ $js := slice $even $main | resources.Concat "js/main.js" | fingerprint }} {{ $js := slice $even $main | resources.Concat "js/main.js" | minify | fingerprint }}
<script type="text/javascript" src="{{ $js.RelPermalink }}"></script> <script type="text/javascript" src="{{ $js.RelPermalink }}"></script>
{{- if and (or .Params.mathjax (and .Site.Params.mathjax (ne .Params.mathjax false))) (or .IsPage .IsHome) }} {{- if and (or .Params.mathjax (and .Site.Params.mathjax (ne .Params.mathjax false))) (or .IsPage .IsHome) }}