Guides 2.0 errors when running server

I’m trying to run the guide on my local machine, I don’t know Hugo.

First I needed to add:

[security]
  enableInlineShortcodes = false
  [security.exec]
    allow = ['^dart-sass-embedded$', '^go$', '^npx$', '^postcss$']
    osEnv = ['(?i)^(PATH|PATHEXT|APPDATA|TMP|TEMP|TERM)$']
  [security.funcs]
    getenv = ['^HUGO_', '^BRANCH']
  [security.http]
    methods = ['(?i)GET|POST']
    urls = ['.*']

to config.toml to whitelisted BRANCH

and now when I try to start the server I got:

bin/server
Start building sites …
hugo v0.96.0+extended darwin/arm64 BuildDate=unknown
ERROR 2022/04/07 14:10:19 render of "page" failed: execute of template failed: template: _default/single.html:51:12: executing "_default/single.html" at <partial "single/sidebar" .>: error calling partial: "guides/themes/hanami/layouts/partials/single/sidebar.html:36:17": execute of template failed: template: partials/single/sidebar.html:36:17: executing "partials/single/sidebar.html" at <.URL>: can't evaluate field URL in type page.Page
ERROR 2022/04/07 14:10:19 render of "page" failed: execute of template failed: template: _default/single.html:51:12: executing "_default/single.html" at <partial "single/sidebar" .>: error calling partial: "guides/themes/hanami/layouts/partials/single/sidebar.html:36:17": execute of template failed: template: partials/single/sidebar.html:36:17: executing "partials/single/sidebar.html" at <.URL>: can't evaluate field URL in type page.Page
ERROR 2022/04/07 14:10:19 render of "page" failed: execute of template failed: template: _default/single.html:51:12: executing "_default/single.html" at <partial "single/sidebar" .>: error calling partial: "guides/themes/hanami/layouts/partials/single/sidebar.html:36:17": execute of template failed: template: partials/single/sidebar.html:36:17: executing "partials/single/sidebar.html" at <.URL>: can't evaluate field URL in type page.Page
ERROR 2022/04/07 14:10:19 render of "page" failed: execute of template failed: template: _default/single.html:51:12: executing "_default/single.html" at <partial "single/sidebar" .>: error calling partial: "guides/themes/hanami/layouts/partials/single/sidebar.html:36:17": execute of template failed: template: partials/single/sidebar.html:36:17: executing "partials/single/sidebar.html" at <.URL>: can't evaluate field URL in type page.Page
Error: Error building site: failed to render pages: render of "page" failed: execute of template failed: template: _default/single.html:51:12: executing "_default/single.html" at <partial "single/sidebar" .>: error calling partial: "guides/themes/hanami/layouts/partials/single/sidebar.html:36:17": execute of template failed: template: partials/single/sidebar.html:36:17: executing "partials/single/sidebar.html" at <.URL>: can't evaluate field URL in type page.Page
Built in 48 ms

Any idea?

:wave: hey @joel which version of Hugo are you using? Check with hugo version.

I guess it is :sweat_smile:

Not far from the last one Releases · gohugoio/hugo · GitHub
Do I need to downgrade it?

Can you try with v0.92.2 of hugo? See Force Hugo version for Netlify · Issue #103 · hanami/guides · GitHub.

1 Like