lana
May 11, 2024, 11:07pm
1
Hello. Sorry for the stupid questions I’m new to Hugo. I use Hinode theme and try to create a slider.
In my config/_default/config.toml:
[params.slider]
images = [
{ src = "/img/hero-slide-1.jpeg", alt = "Hero Slide 1" },
{ src = "/img/mpe-logo.svg", alt = "Image 2" }
]
In my layouts/_default/index.html:
<div class="slider">
{{ range .Site.Params.slider.images }}
<div class="slide">
<img src="{{ .src }}" alt="{{ .alt }}">
</div>
{{ end }}
</div>
File hero-slide-1.jpeg
placed to the static/img/
. I don’t know why, but mpe-logo.svg
is displayed but hero-slide-1.jpeg
no (not found).
How can I solve that problem? Thank you!
Good to see you posted some of your code but unfortunately that’s not enough to help you with your problem:
The the code works in general , but it depends on all the stuff around and the snippets you provided are not sufficient.
lana:
I use Hinode theme and try to create a slider
in my layouts/_default/index.html
Hinode is a quite complex theme regarding layouts and internal processing.
per default it does not use ‘index.html’
we need to see your config and customization. and some details which page Page in /content has the problem
sharing your repository will help - at least for me everything else would be just guessing.
lana
May 12, 2024, 8:37am
3
Oh thank you very much! As it turned out, I use an old version of Hinode. Now I will update the theme and if after that the problem remains then I will definitely write you.