feat: Don't minify when debug params is true
Pour se mettre en mode debug il faut modifier le fichier config.yml: params: debug: true On est obligé de passer par params puisque Hugo ne peut pas utiliser la variable debug directement
This commit is contained in:
@ -1,2 +1,9 @@
|
||||
{{ $style := resources.Get "styles/main.sass" | toCSS | minify | fingerprint }}
|
||||
<link rel="stylesheet" href="{{ $style.Permalink }}">
|
||||
{{ $style := resources.Get "styles/main.sass" }}
|
||||
{{ with $style }}
|
||||
{{ $styleCSS := . | toCSS }}
|
||||
{{ if not $.Site.Params.debug }}
|
||||
{{ $styleCSS = $styleCSS | minify }}
|
||||
{{ end }}
|
||||
{{ $styleCSS = $styleCSS | fingerprint }}
|
||||
<link rel="stylesheet" href="{{ $styleCSS.Permalink }}" integrity="{{ $styleCSS.Data.Integrity }}">
|
||||
{{ end }}
|
||||
|
Reference in New Issue
Block a user