diff --git a/layouts/partials/head.html b/layouts/partials/head.html index ea2de2b..12aa20d 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -59,8 +59,17 @@ {{ $opts := dict "transpiler" "libsass" "targetPath" "css/style.css" }} {{ range site.Params.customCSS }} - {{ with resources.Get . | toCSS $opts | minify | fingerprint }} - + {{ $r := "" }} + {{ with resources.Get . }} + {{ $r = . }} + {{ else }} + {{ errorf "error: You defined customCSS, but %s was not found, please check your config." . }} + {{ end }} + + {{ if $r}} + {{ with $r | toCSS $opts | minify | fingerprint }} + + {{ end }} {{ end }} {{ end }}