resources.Get does not "get" anything?

When using the directive {{ $styles := resources.Get “/css/styles.css” }}, $styles is nil.
My styles.css is in /assets/css, and I am using the extended version of Hugo.

Where can I even start looking for the problem?
Any advice would be appreciated.

Use relative path like this:

{{ $styles := resources.Get “css/styles.css” }}

I’m sorry, that was a typo in my post. That is exactly what I am doing…

{{ $styles := resources.Get “css/styles.css” }}

assets/css/styles.css will be loaded by {{ $styles := resources.Get "css/styles.css" }}

If it is not working something else is up with your site.

Post a link to the repo so we can reproduce the issue.

I just now created the repo, please let me know if I missed anything!

The css file is not named styles.css but style.css.

1 Like

Now that is effing embarrassing. I was messing with it for a few hours and went on to something else. I never even caught that. Thanks for the fresh eyes!

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.