24 lines
733 B
HTML
24 lines
733 B
HTML
{{ $stylesheets := slice }}
|
|
{{ with .Resources.Match "*.css" }}
|
|
{{ range . }}
|
|
{{ $stylesheets = $stylesheets | append . }}
|
|
{{ end }}
|
|
{{ end }}
|
|
|
|
{{ if eq .Kind "home" }}
|
|
{{ with resources.Get "styles/home.css" }}
|
|
{{ $stylesheets = $stylesheets | append . }}
|
|
{{ end }}
|
|
{{ end }}
|
|
|
|
{{ $processedStylesheets := slice }}
|
|
{{ range $stylesheets }}
|
|
{{ $processedStylesheets = $processedStylesheets | append (. | resources.ExecuteAsTemplate .Name .) }}
|
|
{{ end }}
|
|
{{ if hugo.IsProduction }}
|
|
{{ $processedStylesheets = slice ($processedStylesheets
|
|
| resources.Concat (printf "%s/page.css" $.File.Dir)
|
|
| fingerprint "md5") }}
|
|
{{ end }}
|
|
|
|
{{ return $processedStylesheets }}
|