hugo-coder: Unable to build hugo site

i’m running the hugo quickstart, i’ve installed all the dependencies(windows) and have had success running the default ananke theme.
i wanted to use hugo-coder theme
i’m able to download and deploy the theme with default config.toml and theme = "hugo-coder" no problem but
this does not deploy the website as shown in the default demo site

however when i customise config with the default config mentioned on hugo-coder theme site i get this error when running hugo serve or hugo server -D :

PS C:\Users\Asus\website\quickstart> hugo server -D
Start building sites …
ERROR 2021/04/04 11:42:44 render of "home" failed: "C:\Users\Asus\website\quickstart\themes\hugo-coder\layouts\_default\baseof.html:71:40": execute of template failed: template: index.html:71:40: executing "index.html" at <toCSS $cssOpts>: error calling toCSS: no Resource provided in transformation
ERROR 2021/04/04 11:42:44 render of "taxonomy" failed: "C:\Users\Asus\website\quickstart\themes\hugo-coder\layouts\_default\baseof.html:71:40": execute of template failed: template: _default/list.html:71:40: executing "_default/list.html" at <toCSS $cssOpts>: error calling toCSS: no Resource provided in transformation
ERROR 2021/04/04 11:42:44 render of "page" failed: "C:\Users\Asus\website\quickstart\themes\hugo-coder\layouts\_default\baseof.html:71:40": execute of template failed: template: posts/single.html:71:40: executing "posts/single.html" at <toCSS $cssOpts>: error calling toCSS: no Resource provided in transformation
ERROR 2021/04/04 11:42:44 render of "taxonomy" failed: "C:\Users\Asus\website\quickstart\themes\hugo-coder\layouts\_default\baseof.html:71:40": execute of template failed: template: _default/list.html:71:40: executing "_default/list.html" at <toCSS $cssOpts>: error calling toCSS: no Resource provided in transformation
Built in 45 ms
Error: Error building site: failed to render pages: render of "section" failed: "C:\Users\Asus\website\quickstart\themes\hugo-coder\layouts\_default\baseof.html:71:40": execute of template failed: template: posts/list.html:71:40: executing "posts/list.html" at <toCSS $cssOpts>: error calling toCSS: no Resource provided in transformation

am i missing some dependency? i’ve tried installing hugo-extended but i get the same error with that

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 20 (6 by maintainers)

Most upvoted comments

I just ran into the same issue:

  1. I installed hugo-extended.
  2. Followed the instructions in the “Quick Start” section of the project’s README.
  3. Encountered the same errors as @kkarakk.
  4. Found this issue.
  5. Copied over the new/more-up-to-date config file from exampleSite/config.toml as @luizdepra suggested.
  6. Everything started working! 🎉

I think the “issue” is that the example configuration includes customSCSS = ["scss/custom.scss"] and Hugo won’t build the website if that file doesn’t exist, throwing that error.

It’s merely an example though, so I’m not sure it should be changed at all.

It works! thank you @luizdepra , just move your files from static to the root assets folder.

Hey @luizdepra , thank you so much!

I tried this and worked so 😆 😆

Thank you for your time and support on this project!

After enabling a custom scss (customSCSS = ["scss/custom.scss"]) I got that error, but creating a non-empty file at /assets/scss/custom.scss and restarting worked for me.

Using hugo-extended should do the trick. Are you 100% right that you are using the extended version?

Try running hugo version and see if its returns something like this:

$ hugo version
Hugo Static Site Generator v0.79.0-1415EFDC/extended linux/amd64 BuildDate: 2020-11-27T09:16:17Z

Another thing, the wiki config example may be outdated. The exampleSite/config.toml is a better base example.

Also, what is quickstart?