codeandmedia / zola_easydocs_theme

An easy way to create docs for your project
https://easydocs.codeandmedia.com
MIT License
41 stars 19 forks source link

Adding images to text #29

Closed stalkerGH closed 5 months ago

stalkerGH commented 6 months ago

How can I add image to text? If I use standard Markdown syntax ![text](image.png), it doesn't work - shows only description and broken image thumbnail.

EDIT: when I use remote URL to image, it works. How to add local image then?

codeandmedia commented 6 months ago

there is a folder called static if you want to use some images in templates, or check Zola docs how to manage assets https://easydocs.codeandmedia.com/content/overview/#asset-colocation

stalkerGH commented 6 months ago

I added image in static folder but Zola didn't "see" it. But I will check again. Thank you.

c-git commented 6 months ago

Hi @stalkerGH did you get through? If not is the code available online that I can take a look and see what you mean?

stalkerGH commented 6 months ago

@c-git It's more complicated in my case because I removed all subdirectories from content directory and have all .md files together. I have only four simple pages so instead of expanding the structure of my micro website I've used references to self-hosted images on remote server. Maybe this is not most elegant solution but works.

But of course thank you for your willingness to help :)

c-git commented 6 months ago

Ok I'm glad that works for you but if you put each page in a folder then you can co-locate the images. So each for would have index.md and the images. And the site structure in terms of links would stay the same

stalkerGH commented 5 months ago

I have done as you suggested - made separate directories for .md files and put images into them. Now relative paths are working as expected and I have less mess in main content directory. Thanks! :)

stalkerGH commented 5 months ago

Problem is now solved so I close the issue.