add: added error message when customCSS not exist
This commit is contained in:
parent
bd3ab84db8
commit
2259c04f32
@ -59,10 +59,19 @@
|
||||
|
||||
{{ $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 }}
|
||||
<link rel="stylesheet" href="{{ .RelPermalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous">
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ if site.Params.isso.enabled }} {{/* TODO: maybe we can remove it */}}
|
||||
<style>
|
||||
|
Loading…
Reference in New Issue
Block a user