Curiosity: my assets/img folders is not saving on publish


I moved my images from content/ to assets/img to be able to grab them from there.

Somehow, on build, the folder is not being exported to the final /public/ folder.

I’m not doing anything fancy here. I just placed my /img/ folder inside themes/THEME/assets/SUBFOLDER/img/

Can’t wrap my head around this one.

It isn’t and that is by design. The short version is that only the “assets that you use” are published to /public.

I must be doing something wrong, because no matter how I try I can’t get a single image from /resources/ inside my partials.

my images are in /themes/THEME/assets/SUBFOLDER/img

And I’m inside a partial right now, trying to link an image named "hello_world.jpg" but for the life of me I can’t figure out how to do it.

{{ $image := .Resources.GetMatch (.Params.article_img) }}
{{ with $image }}
        <img src="{{ .RelPermalink }}">
{{ end }}

A quick example on how to do it will do wonders. I have gone through the docs already but I’m not a coder, so I failed at getting the gist of it.

I suggest you read the exelent docs on this from here:

I could probably point out specifically what you are doing wrong in your particular case, but I think it would be better if you understood it.

Nah, I’m switching back to wordpress, sadly. I did created a magazine with HUGO, but the thing just gets too technical for us non-coders to handle.

While one of us web designers might get a few things right here and there, most of the time it gets down to guessing and asking around in the forums because errors are really, really (really) non-intuitive.

I think it boils down to this: to mess around, hugo works fantastically well. Pet projects, etc. Maybe even to create a small docs website for something else.

But, for serious stuff? Not there yet. There’s time and money on stake for large projects and hugo always ends up getting in the way (like 80% of the time).

Its a free product and in development, I get it. It will go very, very far. It already has! But right now, its not for us :wink:

You and the community have been great though! (made some really cool friends here, never expected that to happen!)

Big thank you!