minad / olelo

Wiki with git backend
MIT License
241 stars 43 forks source link

Must put ?output=image at the end of images? #34

Closed NathanNeff closed 14 years ago

NathanNeff commented 14 years ago

I'm trying to display an image in a Markdown file: http://notesmine.com/grails_vim.md

I have tried every variation of the Markdown syntax for including images, and all I get is the Alt text rendered.

The markdown syntax is like this: Alt text

If I use this:

Alt text

Then the image renders correctly on the page.

Is this the desired functionality?

Thanks, --Nate

minad commented 14 years ago

fixed in 3ff03207448b8929961c482fa86cd6e0a05abac6

NathanNeff commented 14 years ago

Thanks -- but what about other file types like .org, creole and others?

It seems like the default behavior of the web server should be to serve images, etc. as their standard type unless otherwise specified. Maybe this would mess up other functionality of Olelo, like the albums?

minad commented 14 years ago

This is by design. Olelo serves html pages by default for every repository page. Mediawiki has a similar behaviour: http://de.wikipedia.org/wiki/Datei:Minimoa.jpg

If you want a file to be served in raw, unprocessed mode, you can either specify ?output=download or set the default engine to "Raw Download" in the attribute tab. This is done for example for the robots.txt: http://git.awiki.org/robots.txt

More precise: Use the text engine for text files (Browser renders this as text), use the image engine for images (Browsers shows the image) and the download engine for other binary files (Browser shows download dialog, Content-Disposition is set).

You can also change this behaviour by modifying the engine priorities. Currently imageinfo has a lower priority value than the image engine. See plugins/engine/image.rb plugins/engine/imageinfo.rb