diff --git a/layouts/partials/scripts.html b/layouts/partials/scripts.html index 1ecc0c5f1b..94b5392d3c 100644 --- a/layouts/partials/scripts.html +++ b/layouts/partials/scripts.html @@ -71,8 +71,13 @@ {{ if .Site.Params.prism_syntax_highlighting -}} {{ else -}} - {{ $c2cJS := resources.Get "js/click-to-copy.js" | minify | fingerprint }} - + {{ $c2cJS := resources.Get "js/click-to-copy.js" -}} + {{ if hugo.IsProduction -}} + {{ $c2cJS = $c2cJS | minify | fingerprint -}} + {{ end -}} + {{ end -}}