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:
parent
73e3cec711
commit
31acd82fd8
2 changed files with 16 additions and 16 deletions
|
@ -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 }}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue