hugo-ui-blog/layouts/partials/ui.js.html

2.4 KiB

{{ $scripts := (site.Data.ui.scripts) }} {{ $cfg := (site.Params) }} {{ with ($scripts.vendor.external) }} {{ range . }} {{ end }} {{ end }} {{ with ($scripts.vendor.internal) }} {{ $bundle := slice }} {{ range . }}{{ $bundle = (($bundle) | append (resources.Get .)) }}{{ end }} {{ $bundle = (($bundle) | resources.Concat "js/vendor.bundle.js") }} {{ $bundle = ((($bundle) | minify) | resources.Fingerprint) }} {{ end }} {{ with ($scripts.system.internal) }} {{ $bundle := slice }} {{ range . }}{{ $bundle = (($bundle) | append (resources.Get .)) }}{{ end }} {{ $bundle = ((($bundle) | resources.Concat "js/system.bundle.js") | js.Build) }} {{ $bundle = (($bundle) | resources.ExecuteAsTemplate ("js/system.bundle.js" | relLangURL) .) }} {{ $bundle = ((($bundle) | minify) | resources.Fingerprint) }} {{ end }} {{ if (and ($cfg.node.tabs.comments.enabled) (.Params.comments)) }} {{ $cfg := (site.Params.node.tabs.comments.giscus) }} {{ end }}