Get all the fingerprinting done!
- Add partials in the resources folder for each of the major resources of my site - Consolidate .css and .js files via resources.Concat where possible
This commit is contained in:
parent
d0b223fa33
commit
294fa8343b
14 changed files with 58 additions and 39 deletions
11
layouts/partials/resources/section_css.html
Normal file
11
layouts/partials/resources/section_css.html
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
{{ $sectionCSS := dict }}
|
||||
{{ $sectionStylesheet := "" }}
|
||||
{{ if .IsHome }}
|
||||
{{ $sectionStylesheet = printf "styles/home.css" }}
|
||||
{{ else }}
|
||||
{{ $sectionStylesheet = printf "styles/%s.css" .Section }}
|
||||
{{ end }}
|
||||
{{ with resources.Get $sectionStylesheet }}
|
||||
{{ $sectionCSS = . | fingerprint "sha512" }}
|
||||
{{ end }}
|
||||
{{ return $sectionCSS }}
|
||||
Loading…
Add table
Add a link
Reference in a new issue