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

Extra {{end}} index.html #687

Closed
LoadingStill opened this issue Apr 26, 2024 · 3 comments
Closed

Extra {{end}} index.html #687

LoadingStill opened this issue Apr 26, 2024 · 3 comments

Comments

@LoadingStill
Copy link

File: /themes/ananke/layouts/index.html

Error I am receiving:
(my foldre path vscode)% hugo
Start building sites …
hugo v0.125.2-4e483f5d4abae136c4312d397a55e9e1d39148df+extended darwin/arm64 BuildDate=2024-04-20T15:29:44Z VendorInfo=brew

Total in 116 ms
Error: error building site: render: failed to render pages: render of "home" failed: "(my file path)/themes/ananke/layouts/index.html:48:23": execute of template failed: template: index.html:48:23: executing "main" at <.Site.GetPage>: can't evaluate field Site in type string

I believe there is an extra {{end}} at the end of the iindex.html file.
I am new to Hugo and may be incorrect here as this error only happens when importing an older post and not when creating a new post. But removing the last {{end}} I am no longer receiving this error.

@LoadingStill
Copy link
Author

Looks like you just need to add a $ on line 48 before the first period.
And after I found that, I located the previous issue about that.

@LoadingStill
Copy link
Author

I am unsure if the fix was implemented into index.html, so I will not close at this time to let the maintainer close if it has. I see the pull request in #665, But not able to see the correct code in the master branch.

@ramiro
Copy link
Contributor

ramiro commented Apr 27, 2024

Yes. This is a duplicate of #685 (which is an issue report and a fix PR).

The PR has not been reviewed/accepted/merged into master that's why you don't see the proposed change there yet.

You can close this one as duplicate.

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