Hello folks,
Since bumping to version 0.162 my site fails to build. I dropped back to 0.161 and it works without a problem. Here’s the error output:
building site: render: [en v1.0.0 guest] failed to render pages: render of "/chassis/sv" failed:
"layouts/baseof.html:7:5": execute of template failed:
template: chassis/term.html:7:5: executing "chassis/term.html" at <partial "head.html" .>:
error calling partial: "layouts/_partials/head.html:21:5": execute of template failed:
template: _partials/head.html:21:5: executing "_partials/head.html" at <partialCached "head/css.html" .>:
error calling partialCached: "layouts/_partials/head/css.html:1:18":
execute of template failed: template: _partials/head/css.html:1:18:
executing "_partials/head/css.html" at <templates.Defer>:
error calling Defer:
templates.Defer cannot be used inside a partialCached partial; use partial instead, or move templates.Defer to the calling template
Has something changed between 0.161 and 0.162 that means this partial is no longer valid (obviously I can see the offending line) or is it a bug that shouldn’t happen (and I should report on GH)?
Here’s the CSS partial:
{{ with (templates.Defer (dict "key" "global")) }}
{{ with resources.Get "css/styles.css" -}}
{{ $opts := dict
"inlineImports" true
"optimize" (not hugo.IsDevelopment)
}}
{{ with . | css.TailwindCSS $opts -}}
{{ if hugo.IsDevelopment -}}
<link rel="stylesheet" href="{{ .RelPermalink }}" />
{{ else -}}
{{ with . | minify | fingerprint -}}
<link
rel="stylesheet"
href="{{ .RelPermalink }}"
integrity="{{ .Data.Integrity }}"
crossorigin="anonymous"
/>
{{ end -}}
{{ end -}}
{{ end -}}
{{ end -}}
{{ end -}}
Many thanks!