Closed p7kdev closed 8 months ago
I wonder if I changed the images dir to 'images' from the earlier 'img' when making the slew of updates. Can you check if that would work? I'll update the documentation.
Sorry, it does seem like I broke backward compatibility. changing the folder name from img to images should fix your issue @p7kdev
Here you go. https://github.com/kaapiandcode/hugo-goa/commit/bc81702b824176832eef2d2ca585cc11e1ccacad.
That should fix it.
Thank you very much! I tried it out a bit.
I renamed the img
folder to images
but i still got the same error. With the latest commit (https://github.com/kaapiandcode/hugo-goa/commit/bc81702b824176832eef2d2ca585cc11e1ccacad) the error is gone but the image is also missing in the compiled site. That's because the $image
variable is no longer defined but the part {{ resources.Get (printf "images/%s" .) }}
is empty which is also the root of the problem. It doesn't really matter if the image is in img
or images
.
What works is
{{ with .Site.Params.authorimage }}
{{ $image := (printf "images/%s" .) }}
<img src="{{ $image }}" alt="Author Image" class="img-fluid rounded-circle mx-auto d-block headshot">
{{ end }}
Which basically means that the image is there and can be found. I just assume that the function resources.Get
does not work quite as intended.
hugo version
hugo v0.122.0+extended linux/amd64 BuildDate=unknown
Thanks for your input @p7kdev. I'll revert back to the previous state and investigate.
Demo Video / Screen Recording: https://github.com/kaapiandcode/hugo-goa/assets/673924/3df82a91-e737-4b47-a208-05e3a0b01e75
I tried the latest version of this theme on my demo repo and it seems to work. What am I doing differently?
Thanks for the demo. Now I got it! It was the parent directory.
Previously the image had to be placed in static/img, but now apparently in assets/img (or assets/images). However, other files would probably have to remain in static (e.g. custom.css). Therefore, this was not found. I have now moved the image to assets/images. And now it works as expected!
The static folder is still given in the README ;-).
Thank you very much for your help!
Hi,
first of all, thank you very much for the great theme. But I currently have a problem. I can no longer build my site with the latest release (1.0.0).
This part seems new (
layouts/partials/avatar.html
).I have defined the
authorimage
variable in hugo.tomlbut it is located in
static/img
(as mentioned in the docs).Do I have to define anything in addition? Is this a bug?
Many thanks already!
Best regards, Paul