eddiewebb / hugo-resume

A Hugo theme ported from startbootrap.com's resume template
https://themes.gohugo.io/hugo-resume/
MIT License
262 stars 233 forks source link

Unable to render template from exampleSite #104

Open pichouk opened 11 months ago

pichouk commented 11 months ago

Hi,

I'm trying to setup a website using this theme, but I constantly have a can't evaluate field Site in type *page.siteWrapper error. After a few experiments, I decided to try to use the example site provided, to debug where I'm wrong. But it seems that even the example site have the same issue. I don't know what to do, I'm new to Hugo to be honest.

I'm using Hugo 0.119.0 on Debian Linux 12.1. Steps to reproduce :

$ git clone git@github.com:eddiewebb/hugo-resume.git                   
$ cd hugo-resume/exampleSite
$ hugo -t hugo-resume --themesDir ../.. server
Watching for changes in /tmp/f/hugo-resume/{archetypes,data,exampleSite,i18n,layouts,static}
Watching for config changes in /tmp/f/hugo-resume/exampleSite/config.toml
Start building sites … 
hugo v0.119.0-b84644c008e0dc2c4b67bd69cccf87a41a03937e linux/amd64 BuildDate=2023-09-24T15:20:17Z VendorInfo=gohugoio

Built in 57 ms
Error: error building site: render: failed to render pages: render of "home" failed: execute of template failed: template: index.html:19:12: executing "main" at <partial (printf "portfolio/%s" .) $.Site>: error calling partial: "/tmp/f/hugo-resume/layouts/partials/portfolio/skills.html:4:14": execute of template failed: template: partials/portfolio/skills.html:4:14: executing "partials/portfolio/skills.html" at <$.Site.Data.skills>: can't evaluate field Site in type *page.siteWrapper

Thanks a lot for your help :)

admatt01 commented 10 months ago

I have the same issue. Also using 0.119.0 Think it might be an issue with forward compatibility? Very frustrating as I really like this template!

pichouk commented 10 months ago

Yeah me too, I cannot update my online resume so I cannot search for a new job :rofl:

But you might be right, maybe I should try with older versions of Hugo if it's a compatibility issue.

admatt01 commented 10 months ago

ok I uninstalled 0.119.0 and installed 0.78.0 and the error has gone! Much more progress now. Haven't done much else and only tested a local render. Netlify should support it using Environment Variables

image

pichouk commented 10 months ago

After a few try, I found that the latest Hugo version working with this theme is 0.111.3. So version 0.112.0 introduced a change that is the cause of this error.

admatt01 commented 10 months ago

After a few try, I found that the latest Hugo version working with this theme is 0.111.3. So version 0.112.0 introduced a change that is the cause of this error.

Great. Always good to run the latest version possible I think.

py563 commented 9 months ago

ok I uninstalled 0.119.0 and installed 0.78.0 and the error has gone! Much more progress now. Haven't done much else and only tested a local render. Netlify should support it using Environment Variables

image

can you see blogs listed in home page here with that particular hugo version

py563 commented 9 months ago

After a few try, I found that the latest Hugo version working with this theme is 0.111.3. So version 0.112.0 introduced a change that is the cause of this error.

@pichouk check #105 pull request. hi @eddiewebb can you please merge that pull request when you get a chance