This is two questions in one. The best way to explain is to first get a visual of my site at https://jarss.github.io/TAONAW/
I have a nav-bar at the left, and I want to place an image between the title of the site and the descriptive text below it. This should be done through sidebar.html in my theme, from my understanding. The title is {{ .Site.Title }}
and the text directly below is {{Site.params.description}}
.
OK, so I tried a simple HTML <img src>
and couldn’t get it working with a relative path when I run Hugo server locally. I tried absolute path too, then when that didn’t work I tested my HTML with just a three-line HTML file that called the image from an absolute local path. That worked, finally.
So now, I took the absolute path that worked, with the “file:///” and placed that within the <img src>
just to see what would happen and… no image. Hugo seemed to open a tiny little bit space between the title and the description text, as if something got in there, but it’s not my image. I also didn’tt get a broken image link icon this way (I did previously with all the other attempts)
Here are my questions:
- is using plain HTML to place an image is the best way to do so in Hugo, or is there a shortcode for that? search in Hugo docs brings me to Image Processing, which tells me what I can do with an image once it’s already there.
- How do I place an image with a relative path to the Hugo site so that when I push it, Hugo will show it? I got images to work through a post, but this is the main site’s sidebar.
Thanks, sorry this is confusing I’m still trying to figure out what is exactly the problem I’m having.