开发者

Fossil: how to display checked in image files on wiki pages?

开发者 https://www.devze.com 2023-01-20 21:43 出处:网络
Here is the complete workflow: Initialize the repository and the workspace $ fossil new repo.fossil $ mkdir workspace

Here is the complete workflow:

Initialize the repository and the workspace

$ fossil new repo.fossil
$ mkdir workspace
$ cd workspace
$ fossil open ../repo.fossil

Add an image file to the repository

$ 开发者_开发技巧fossil add image.jpg
$ fossil commit -m "added image.jpg"

Start fossil server:

$ fossil server

Open the web interface in the browser:

BROWSERNAME 127.0.0.1:8080

Now I'd like to get image.jpg displayed in a wiki page.

Things I've tried:

[image.jpg]
<img src="image.jpg">

I've also tried to toggle the "Use HTML as wiki markup language" in Admin->Configuration


see this page. You should use <img src='/doc/tip/image.jpg'/> I believe.


I got it to work, though through a roundabout process.

Once you've checked in an image, find it in the Files section of your "fossil ui", click it, and see that it displays the image there for you. From there, you can take the URL of that image (in Chrome, right-click it, "Copy image URL". In my test, that URL was http://localhost:8081/raw/2c2e13a1f71295c3?m=image/jpeg

Then edit your wiki page and add, for example:

<img src="http://localhost:8081/raw/2c2e13a1f71295c3?m=image/jpeg"/>
0

精彩评论

暂无评论...
验证码 换一张
取 消