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

Hugo "can't evaluate field Hugo in type *hugolib.pageState" when building site #10436

Closed
McCoyAle opened this issue Nov 14, 2022 · 2 comments
Closed

Comments

@McCoyAle
Copy link

What version of Hugo are you using (hugo version)?

$ hugo version

Does this issue reproduce with the latest release?

Yes, this is also a follow-up to this issue #10435

Issue:

After successfully importing a Jekyll project into my Hugo project, Hugo output the following steps to follow:

  1. $ git clone https://github.com/spf13/herring-cove.git /Users/alexandram/test/themes/herring-cove
  2. $ cd /Users/alexandram/test
  3. $ hugo server --theme=herring-cove

When following these commands, it seems that hugo is reporting that it is not able to execute one of the templates due to not being able to evaluate the hugo library page state. This was a jekyll project that was imported into an existing project. The existing project was created using the expected hugo new site <test> command.

Start building sites … hugo v0.105.0+extended darwin/amd64 BuildDate=unknown ERROR 2022/11/14 10:26:58 render of "page" failed: execute of template failed: template: partials/header.html:8:10: executing "partials/header.html" at <.Hugo.Generator>: can't evaluate field Hugo in type *hugolib.pageState ERROR 2022/11/14 10:26:58 render of "page" failed: execute of template failed: template: partials/header.html:8:10: executing "partials/header.html" at <.Hugo.Generator>: can't evaluate field Hugo in type *hugolib.pageState ERROR 2022/11/14 10:26:58 render of "page" failed: execute of template failed: template: partials/header.html:8:10: executing "partials/header.html" at <.Hugo.Generator>: can't evaluate field Hugo in type *hugolib.pageState ERROR 2022/11/14 10:26:58 render of "page" failed: execute of template failed: template: partials/header.html:8:10: executing "partials/header.html" at <.Hugo.Generator>: can't evaluate field Hugo in type *hugolib.pageState ERROR 2022/11/14 10:26:58 render of "page" failed: execute of template failed: template: partials/header.html:8:10: executing "partials/header.html" at <.Hugo.Generator>: can't evaluate field Hugo in type *hugolib.pageState Error: Error building site: failed to render pages: render of "home" failed: "/Users/alexandram/test/themes/herring-cove/layouts/index.html:9:17": execute of template failed: template: index.html:9:17: executing "index.html" at <.RSSLink>: can't evaluate field RSSLink in type *hugolib.pageState Built in 98 ms

Is there another step that needs to be done regarding the templates when using the import command?

@bep
Copy link
Member

bep commented Nov 14, 2022

The field in question was deprecated a long time ago and now removed.

For further questions/troubleshooting, see https://discourse.gohugo.io/

@bep bep closed this as completed Nov 14, 2022
@github-actions
Copy link

github-actions bot commented Dec 6, 2022

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 6, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants