script.html 540 B

123456789101112
  1. {{- partial "helper/external" (dict "Context" . "Namespace" "Vibrant") -}}
  2. {{- $opts := dict "minify" hugo.IsProduction -}}
  3. {{- $script := resources.Get "ts/main.ts" | js.Build $opts -}}
  4. <script type="text/javascript" src="{{ $script.RelPermalink }}" defer></script>
  5. {{- with resources.Get "ts/custom.ts" -}}
  6. {{/* Place your custom script in HUGO_SITE_FOLDER/assets/ts/custom.ts */}}
  7. {{- $customScript := . | js.Build $opts -}}
  8. <script type="text/javascript" src="{{ $customScript.RelPermalink }}" defer></script>
  9. {{- end -}}