Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

if not hugo.IsServer causes error #19

Closed
jrilez opened this issue Feb 20, 2024 · 2 comments
Closed

if not hugo.IsServer causes error #19

jrilez opened this issue Feb 20, 2024 · 2 comments

Comments

@jrilez
Copy link

jrilez commented Feb 20, 2024

Just cloned the theme, tried starting the server, got the following

ERROR 2024/02/20 15:35:28 render of "taxonomy" failed: "/var/www/hugoDev/themes/soho/layouts/_default/baseof.html:77:14": execute of template failed: template: _default/taxonomy.html:77:14: executing "_default/taxonomy.html" at <hugo>: can't evaluate field IsServer in type interface {}
ERROR 2024/02/20 15:35:28 render of "taxonomy" failed: "/var/www/hugoDev/themes/soho/layouts/_default/baseof.html:77:14": execute of template failed: template: _default/taxonomy.html:77:14: executing "_default/taxonomy.html" at <hugo>: can't evaluate field IsServer in type interface {}
Error: Error building site: failed to render pages: render of "home" failed: "/var/www/hugoDev/themes/soho/layouts/_default/baseof.html:77:14": execute of template failed: template: index.html:77:14: executing "index.html" at <hugo>: can't evaluate field IsServer in type interface {}

Had to remove the following from layouts/_default/baseof.html

    {{ if not hugo.IsServer }}
      {{ template "_internal/google_analytics.html" . }}
    {{ end }}
@jrilez jrilez closed this as completed Feb 20, 2024
@alexandrevicenzi
Copy link
Owner

Update Hugo to 0.120.0 or higher.

@jrilez
Copy link
Author

jrilez commented Feb 21, 2024

Yeah I realized that like 2 seconds after I posted this, so I closed it immediately. Sorry

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants