HUGO

Pictures are not shown on the main page

I am embedding honey in my post using the location in the folder with the md file.

I.e

post
| - index.md
| - img.jpg
| - video.mp4

Paste it into the article itself! [Image] (img.jpg) and it works great. But my template has a trick, the entire post can be displayed on the main page. And due to the generation of the relative address, there are no pictures on the main page.

You can somehow make them appear. For example, configure the generation of an absolute path.

P.S. Just don’t suggest using the static folder

What do you mean by the above?

Images residing under a Page Bundle can be rendered on List Pages (including the homepage) with the methods described in the Hugo Docs section about the Image Page Resource.

1 Like

So… how are your “relative addresses” “generated”? How about a layout file? Your image in the content folder is a resource and that has a unique absolute address. Just don’t link it relative.

Hello again
Thanks a lot for your answer. I was able to handle the images. But I don’t understand how to deal with video.

Except how to insert the full link to the video, nothing comes to mind

Have a look at this topic:

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