Recently started using ikiwiki. This is my variation of the laptop instructions, but with a stricter policy on paths, to make maintenence of multiple wikies easier.


Each wiki has the following directory structure:



  • wikiname/ctl, is the git repo containing the setup file and any templates, origin could be on github.
  • wikiname/repo, is the bare git repo for the wiki content (on server, it might be a symlink to /srv/git/wikiname).
  • wikiname/edit, a clone of ../repo/ in which edits can be made.
  • wikiname/src, a clone of ../repo/ intended for ikiwiki's private use and should not be touched. (If wikicontent need to link to large binary data, then we can place the files here by hand.)
  • wikiname/publish, probably a symlink to /var/www/wikiname or ~/public_html/wikiname

Now rsync wikiname to the laptop, and in wikiname/edit add the servers 'repo' as a remote. The remaining task is to manage the wikiname/ctl/wikiname.setup so that it can be used by both machines. If everything has been setup correctly, a two line patch is all that is needed to switch between the configuration of the two machines.

it should look something like:

diff --git a/mhameed.setup b/mhameed.setup
index 909995b..4322732 100644
--- a/mhameed.setup
+++ b/mhameed.setup
@@ -21,9 +21,9 @@ srcdir: /home/cs3mmh/vr/mhameed/src
 # where to build the wiki
 destdir: /home/cs3mmh/vr/mhameed/publish/
 # base url to the wiki
+url: http://venus/~cs3mmh/MHameed
 # url to the ikiwiki.cgi
+cgiurl: http://venus/~cs3mmh/MHameed/ikiwiki.cgi
 # filename of cgi wrapper to generate
 cgi_wrapper: /home/cs3mmh/vr/mhameed/publish/ikiwiki.cgi
 # mode for cgi_wrapper (can safely be made suid)

Then just use stgit to keep the seperation between actual configuration and machine specific settings, or patch/reverse patch to switch contexts.