summaryrefslogtreecommitdiff
path: root/themes/neonxp/layouts/_partials/head/js.html
blob: 1b7c18e98f09b263e2b5c25ffa6a94b42e15974a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<!-- {{- with resources.Get "js/main.js" }}
  {{- $opts := dict
    "minify" (not hugo.IsDevelopment)
    "sourceMap" (cond hugo.IsDevelopment "external" "")
    "targetPath" "js/main.js"
  }}
  {{- with . | js.Build $opts }}
    {{- if hugo.IsDevelopment }}
      <script src="{{ .RelPermalink }}"></script>
    {{- else }}
      {{- with . | fingerprint }}
        <script src="{{ .RelPermalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous"></script>
      {{- end }}
    {{- end }}
  {{- end }}
{{- end }} -->