Error "no layout given" after Hugo upgrade

:wave:t2: I upgraded Hugo to v0.115.3+extended darwin/arm64 BuildDate=unknown (unfortunately I don’t know what version I was using so I can’t just downgrade) and I’m now getting the following error…

Error: error building site: render: failed to render pages: render of "home" failed: "/Users/integralist/Code/site/themes/minimo/layouts/index.html:2:39": execute of template failed: template: index.html:2:39: executing "index.html" at <.Render>: error calling Render: no layout given

If I look at the index.html file referenced, then all I see is…

{{ if .Site.Home.Content }}
    {{ with .GetPage "/posts" }}{{.Render}}{{ end }}
{{ end }}

So I’m not what has changed in recent Hugo versions that would cause the build to fail.

Does anyone have any ideas on how I can debug this, thanks.

Aha! Return error when .Render is invoked without arg · gohugoio/hugo@4da672a · GitHub

OK fixed this by passing an argument (one of the template files)…

{{.Render "list"}}
1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.