mirror of
https://github.com/gohugoio/hugo.git
synced 2025-04-25 21:21:22 +03:00

- Update the skeleton structure to match the new template system. - Add a --format flag to the `hugo new theme` command to control the format of the site configuration and default archetype files. - Remove theme.toml. This file's presence can be confusing for new users, and the README in the themes repository already has an example. - Remove the LICENSE and README files from the skeleton. These files are not needed for a theme to work, and they can be added later by the user if desired. Closes #13489 Closes #13544
16 lines
520 B
HTML
16 lines
520 B
HTML
{{- 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 }}
|