Welcome to mirror list, hosted at ThFree Co, Russian Federation.

script-src.html « turbo « jslibs « partials « layouts « turbo - github.com/gohugoio/hugo-mod-jslibs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: e274abea63de63f2d674a7ba3012f1367cdf2eb2 (plain)
1
2
3
4
5
6
7
{{ $sourceMap := cond hugo.IsProduction "" "inline" }}
{{ $opts := dict "sourceMap" $sourceMap "minify" hugo.IsProduction "target" "es2016" }}
{{- $js := resources.Get "jslibs/turbo/index.ts" | js.Build $opts -}}
{{- if hugo.IsProduction }}
  {{ $js = $js | fingerprint }}
{{ end -}}
<script src="{{ $js.RelPermalink }}" {{ if hugo.IsProduction }} integrity="{{ $js.Data.Integrity }}" {{ end }} defer></script>