Get the line breaking situation working correctly

The way whitespace is handled in Hugo templates is difficult to understand. I
accidentally pushed a broken version to production. This fixes the issue and
improves the formatting of the template code.
This commit is contained in:
Eryn Wells 2024-11-14 08:49:09 -08:00
parent 73e3cec711
commit 31acd82fd8
2 changed files with 16 additions and 16 deletions

View file

@ -1,6 +1,7 @@
{{- $resourcePath := .resource -}}
{{- $minify := .minify | default true -}}
{{- $resource := dict -}}
{{- with resources.Get $resourcePath }}
{{- if eq hugo.Environment "development" }}
{{- with . | js.Build }}
@ -12,7 +13,7 @@
{{ $resource = . }}
{{- end }}
{{- end }}
{{ else }}
{{- else }}
{{ warnf "Unable to find JavaScript resource: %s" $resourcePath }}
{{- end }}