StefMa / hugo-fresh

Hugo Fresh Theme
https://hugo-fresh.vercel.app
MIT License
628 stars 368 forks source link

Error rendering the hugo site #10

Closed liz-miller closed 6 years ago

liz-miller commented 6 years ago

Can't seem to get the hugo site to build. I've followed your steps in the README. I'm on a Mac running the latest version of hugo (Hugo Static Site Generator v0.41) with Node.js installed.

This is the error I'm getting. Probably something simple, so your help is appreciated!

Building sites … ERROR 2018/05/31 19:35:55 Error while rendering "home" in "": template:
/Users/liz/Documents/hugo/fresh-landing-page/themes/hugo-fresh/layouts/index.html:6:7:
executing "/Users/liz/Documents/hugo/fresh-landing-page/themes/hugo-fresh/layouts/index.html" 
at <partial "css.html" .>: error calling partial: template: theme/partials/css.html:5:36: executing 
"theme/partials/css.html" at <index .Site.Data.ass...>: error calling index: index of untyped nil
dkinder commented 6 years ago

Did you run the following per the instructions? (cd themes/hugo-fresh && make setup && make dev)

liz-miller commented 6 years ago

Yes, but it failed. Not sure why

lucperkins commented 6 years ago

Hmmm. It looks like the CSS isn't being built. Are you running the two processes in separate terminal windows?

liz-miller commented 6 years ago

Yes, i ran the (cd themes/hugo-fresh && make setup && make dev) and this error occurred:

Lizs-MBP:fresh-landing-page liz$ (cd themes/hugo-fresh/ && make setup && make dev)
yarn
make: yarn: No such file or directory
make: *** [setup] Error 1

Then when I run the hugo server I receive this error...

Lizs-MBP:fresh-landing-page liz$ hugo server
Building sites … ERROR 2018/06/01 10:07:49 Error while rendering "home" in "": template:
/Users/liz/Documents/hugo/fresh-landing-page/themes/hugo-fresh/layouts/index.html:6:7:
executing "/Users/liz/Documents/hugo/fresh-landing-page/themes/hugo-fresh/layouts/index.html"
at <partial "css.html" .>: error calling partial: template: theme/partials/css.html:5:36: executing
"theme/partials/css.html" at <index .Site.Data.ass...>: error calling index: index of untyped nil
Total in 118 ms
Error: Error building site: logged 1 error(s)

Both run in separate terminals. I'm on a Mac if that makes any difference. Tried removing and setting up the hugo site a few times. Same error.

I have another hugo website running on github pages (no problems), so I'm familiar with that, just curious about how this theme uses Node.js and wanted to try it out!

Thanks!

lucperkins commented 6 years ago

@liz-miller Ah, I see. Forgot to put in the README that you'll need to have Yarn installed. Since you're on macOS a simple brew install yarn should do the trick!

lucperkins commented 6 years ago

Okay, I've update the README to reflect this requirement 👍

liz-miller commented 6 years ago

Thanks, I got it to work now!

lucperkins commented 6 years ago

@liz-miller Awesome! So glad you were able to get up and running