fossil-json-wiki  README

This is the README for the "fwiki" prototype/experimental wiki which uses the Fossil SCM as its back-end.

This application demonstrates using the Fossil JSON API to create a dedicated wiki editor, independent of the standard Fossil HTML interface. The end goal here is to eventually use fossil as a back-end for dedicated wikis, without exposing fossil (as an SCM) directly to the client. Such wikis need not use Fossil for wiki parsing (fossil's wiki format is a topic of much debate), but could use client-side renderers to display the page content how they like. They could also abuse fossil's wiki mechanism to store wiki pages as full-fledged JSON objects, along with metadata such as the name of the data format of the wiki's content.

Source Code

The live demo of this code can be seen at:

The source code for this wiki (JS, HTML, and CSS) can be found at:

But this code is experimental and some of it is not documented. It requires a fossil server or CGI built with JSON support enabled: pass --enable-json to the configure script before building fossil, and do a clean build beforehand to make sure everything gets recompiled.

Setting it up locally

  • Check out the source code (see the download page).
  • Set up an apache vhost pointing to the top source dir. See below.
  • Add an entry to your /etc/hosts
  • Create a CGI script. See below.
  • Try it out.

Apache Vhost

Add a vhost entry like the following to your apache configuration:

<VirtualHost *:80>
    ServerName fwiki.local
    ScriptAlias /cgi-bin/ /path/to/fwiki/cgi-bin/
    DocumentRoot /path/to/fwiki

And add the host name from the vhost entry into your /etc/hosts:    fwiki.local

Some systems might require instead. You can of course bind to any other local IP if you wish.

CGI Script

Put the following content in cgi-bin/fwiki.cgi:

repository: /path/to/your-fossil-repo.fossil

And make it executable (using mode 0555, 0500, or whatever is appropriate for your environment).

If you rename the CGI script, be sure to edit the path in the *.html file(s).

Set the Fossil URL

Search the HTML files for "Change this URL" and replace the URL to point to your fossil CGI script (the one described above).

Try it Out

Just point your browser at http://your-host/path/to/wiki-editor.html. You may want to symlink wiki-editor.html to index.html for convenience.