mblayman / markwiki

:warning: UNMAINTAINED: A simple wiki using Markdown
BSD 2-Clause "Simplified" License
29 stars 14 forks source link

Display images #39

Closed thomflo closed 7 years ago

thomflo commented 7 years ago

Hi,

markwiki has all features I want, but I have some issue with the images. How can I render them? They are in the same folder as the .md where they're used, but the src link is broken. I tried with ../img.png and with absolute path: no results.

Thanks for your help

mblayman commented 7 years ago

I think this is not going to work without some help from a web server like Nginx. The built-in server only recognizes certain routes like /wiki/<some wiki path and /list/<some wiki path>. It doesn't know how to serve images (nor is the underlying server designed to do so).

My guess is that you could get this to work by using Nginx as a reverse proxy and let it serve images under some absolute path like /images.

I'm running this project in complete maintenance mode since I'm not a user of it myself so this is not a feature I'm planning to add. If you manage to get this working with Nginx and would be interested in documenting it, I'd be happy to merge that change.

Thanks!