Fix all the CSS resources templates
This commit is contained in:
parent
da64dd30d5
commit
6740e7b61d
3 changed files with 48 additions and 24 deletions
|
|
@ -1,5 +1,12 @@
|
|||
{{ $pageCSS := dict }}
|
||||
{{ $stylesheets := slice }}
|
||||
{{ with .Resources.Match "*.css" }}
|
||||
{{ $pageCSS = . | resources.Concat (printf "%s/page.css" $.File.Dir) | fingerprint "md5" }}
|
||||
{{ range . }}
|
||||
{{ $stylesheets = $stylesheets | append (. | resources.ExecuteAsTemplate .Name .) }}
|
||||
{{ end }}
|
||||
{{ if hugo.IsProduction }}
|
||||
{{ $stylesheets = slice ($stylesheets
|
||||
| resources.Concat (printf "%s/page.css" $.File.Dir)
|
||||
| fingerprint "md5") }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ return $pageCSS }}
|
||||
{{ return $stylesheets }}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue