24 lines
1,000 B
HTML
24 lines
1,000 B
HTML
|
{{- $variables := partial "functions/getScript" (dict "slug" "variables") }}
|
||
|
{{- $functions := partial "functions/getScript" (dict "slug" "functions") }}
|
||
|
{{- $code := partial "functions/getScript" (dict "slug" "code") }}
|
||
|
{{- $mode := partial "functions/getScript" (dict "slug" "mode") }}
|
||
|
{{- $main := partial "functions/getScript" (dict "slug" "index") }}
|
||
|
|
||
|
{{- $customScriptPath := "js/custom.js" }}
|
||
|
{{- $customScriptRelPath := "../../assets/js/custom.js" }}
|
||
|
{{- if (fileExists $customScriptRelPath) }}
|
||
|
{{- $customScriptPath = $customScriptRelPath }}
|
||
|
{{- end }}
|
||
|
{{- $custom := resources.Get $customScriptPath | resources.ExecuteAsTemplate $customScriptPath . }}
|
||
|
|
||
|
{{- partial "scripts/getJsBundle" (dict "scripts" (slice $variables $functions $code $mode $main $custom) "slug" "bundle" "inline" true) }}
|
||
|
|
||
|
{{- partial "scripts/search" . -}}
|
||
|
{{- partialCached "hooks/scripts" . -}}
|
||
|
|
||
|
{{- with site.Params.customJS }}
|
||
|
{{- range . -}}
|
||
|
<script src="{{ . }}" async></script>
|
||
|
{{- end }}
|
||
|
{{- end -}}
|