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

Issues with render-link.html #958

Closed
colinpickup opened this issue Nov 9, 2024 · 2 comments
Closed

Issues with render-link.html #958

colinpickup opened this issue Nov 9, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@colinpickup
Copy link

Issue description

When I try and run hugo after installing the theme, I get thefollowing error:
Error: add site dependencies: load resources: loading templates: "./themes/congo/layouts/_default/_markup/render-link.html:2:1": parse failed: template: _default/_markup/render-link.html:11: function "hasPrefix" not defined

I searched and found this issue on Hugo itself where they said it ws probably due to using the wrong shorthand for the links:
gohugoio/hugo#12929

Replacing the {{<s with {{%s changed the error to:
Error: add site dependencies: load resources: loading templates: "./themes/congo/layouts/_default/_markup/render-link.html:11:1": parse failed: template: _default/_markup/render-link.html:11: function "hasSuffix" not defined

I changed "hasSuffix" to "strings.hasSuffix" and that changed the error again to:
Error: add site dependencies: load resources: loading templates: "./themes/congo/layouts/partials/footer.html:7:1": parse failed: template: partials/footer.html:7: function "page" not defined

Is this a bug with Hugo or am I missing something? Am I on the wrong version of Hugo, Go, Congo or something? I'm new to Hugo, this is only my second time using it.

This is otherwise a completely blank, newly created, hugo repository. I first tried to install the theme using hugo with the instructions here on the installation page. I hit the same issue so now it is intsalled as a git submodule.

Theme version

v2.9.0

Hugo version

hugo v0.92.2+extended linux/amd64 BuildDate=2023-01-31T11:11:57Z VendorInfo=ubuntu:0.92.2-1ubuntu0.1

Which browser rendering engines are you seeing the problem on?

Other (Please include details in the issue description)

URL to sample repository or website

No response

Hugo output or build error messages

Initial Error:
Error: add site dependencies: load resources: loading templates: "./themes/congo/layouts/_default/_markup/render-link.html:2:1": parse failed: template: _default/_markup/render-link.html:11: function "hasPrefix" not defined

Second Error:
Error: add site dependencies: load resources: loading templates: "./themes/congo/layouts/_default/_markup/render-link.html:11:1": parse failed: template: _default/_markup/render-link.html:11: function "hasSuffix" not defined

Third Error:
Error: add site dependencies: load resources: loading templates: "./themes/congo/layouts/partials/footer.html:7:1": parse failed: template: partials/footer.html:7: function "page" not defined
@colinpickup colinpickup added the bug Something isn't working label Nov 9, 2024
@tremelow
Copy link

I had the same issue, but managed to fix in thanks to a previous resolved issue. Basically, the apt version of Hugo is too old, and you should install a recent one. In the latest releases, pick the appropriate extended .deb: Linux AMD64 (without the extended version, there are other issues).

Hope this helps!

@jpanther
Copy link
Owner

jpanther commented Dec 6, 2024

Please try this again with a more recent Hugo version and open a new issue if you are still having trouble.

@jpanther jpanther closed this as not planned Won't fix, can't repro, duplicate, stale Dec 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants