Using fossil embedded documents

fossil

Solution

If your document is located in `%fossil-root%\doc\foo.wiki`, you can access it at the following URL:

`http://localhost:8080/doc/trunk/doc/foo.wiki`

This URL breaks down as follows:

- `http://localhost:8080` is the root URL to access Fossil when you run `fossil ui`

- `/doc` signals that you want to access embedded documentation

- `/trunk` indicates the checkin containing the documentation you wish to access

- `/doc/foo.wiki` is the path of the document inside the repository

Instead of `trunk`, you can also specify a tag, or a branch name, or even a hexadecimal checkin identifier.

In the URL you were using, `http://localhost:8080/doc/foo.wiki`, foo.wiki is interpreted as the checkin name, and no document path is specified, which logically means Fossil won't find anything.

As for an example repository containing embedded documentation, the homepage of the Fossil website itself is a prime example:

https://www.fossil-scm.org/index.html/doc/trunk/www/index.wiki

where

- `https://www.fossil-scm.org/index.html` is Fossil's root URL

- `/doc` indicates a request for embedded documentation

- `/trunk` indicates we want to fetch files from the trunk

- `/www/` is the path to the requested file inside the repository

- `index.wiki` is the name of the file inside the repository.

So, in the 'trunk' branch of the repository, the file www/index.wiki contains the home page of the Fossil website.

Problem

I'm using `fossil` to manage some home projects and keeping notes in the wiki. After running like this for a few months, I'd like to at least try to use embedded documentation; mainly so as to be able easily to go back to previous versions. I've studied the website page about managing project documentation which confirms that this is a technique I want to follow up, but I can't make out how to do it. I've cut-and-pasted one of my wiki pages and added it to my fossil repo, but I can't work out where it should go in the directory structure to be accessible as described on the above page. I've tried in a few places none of which worked. The document is currently %fossil-root%\doc\foo.wiki, (I'm on Windows), where %fossil-root% is the directory holding _ _FOSSIL__ (slighly mangled filename because of markdown), but having started a server with `fossil ui`, when I point my browser at `http://localhost:8080/doc/foo.wiki`, fossil presents me with a nicely formatted page saying it can't find index.html. I created /doc/index.html to see what would happen, but it made no difference. Please can someone help me out, and/or point me to an example repository containing embedded documentation or another "how-to" document.

Original source