🎉 Hello World
This commit is contained in:
19
layouts/partials/custom-js.html
Normal file
19
layouts/partials/custom-js.html
Normal file
@@ -0,0 +1,19 @@
|
||||
{{- $js := "" -}}
|
||||
{{- range site.Params.assets.js -}}
|
||||
{{- $customJS := resources.Get . -}}
|
||||
{{- if $customJS -}}
|
||||
{{- if eq $js "" -}}
|
||||
{{- $js = $customJS -}}
|
||||
{{- else -}}
|
||||
{{- $js = slice $js $customJS | resources.Concat (printf "%s.tmp_custom.js" .) -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- if ne $js "" -}}
|
||||
{{- $coreJS := slice $js ("" | resources.FromString "js/_core.js") | resources.Concat "js/core.js" -}}
|
||||
{{- $coreJS = $coreJS | resources.Minify | resources.Fingerprint "sha384" -}}
|
||||
<script src="{{- $coreJS.RelPermalink -}}" integrity="{{- $coreJS.Data.Integrity -}}"></script>
|
||||
{{- end -}}
|
||||
|
||||
{{- partial "js.html" . -}}
|
Reference in New Issue
Block a user