Merge pull request #57 from Junyi-99/feat-experimental-config
add: added error message when customCSS not exist
This commit is contained in:
commit
fbd7b4c939
@ -59,10 +59,19 @@
|
|||||||
|
|
||||||
{{ $opts := dict "transpiler" "libsass" "targetPath" "css/style.css" }}
|
{{ $opts := dict "transpiler" "libsass" "targetPath" "css/style.css" }}
|
||||||
{{ range site.Params.customCSS }}
|
{{ 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">
|
<link rel="stylesheet" href="{{ .RelPermalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous">
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
{{ if site.Params.isso.enabled }} {{/* TODO: maybe we can remove it */}}
|
{{ if site.Params.isso.enabled }} {{/* TODO: maybe we can remove it */}}
|
||||||
<style>
|
<style>
|
||||||
|
Loading…
Reference in New Issue
Block a user