My favorites | Sign in
Project Logo
                
Search
for
Updated Mar 28, 2009 by Jose.R.Fonseca
Labels: Script, Python
StaticWiki  
Static Wiki

Static Wiki has now its own project. This page is left just for historical purposes.

About

This is a trimmed down Wiki engine, that generates static HTML from wikitext.

Although a static wiki might strike you as an obvious oxymoron, the idea is the content is managed by an external tool (typically a code versioning system such as CVS or Subversion), rather than by the Wiki engine itself.

This was inspired from Google Code Wiki, and is aimed to be used in open-source hosting services such as SourceForge or Berlios, which provide code versioning systems, but where the usage Wiki is either not supported or encumbered by several aspects.

Doing so has several advantages:

And of course, disadvantages:

Furthermore, at the present, this is an unpolished hack, so your mileage may vary.

The Wiki engine was adapted from the MoinMoin Wiki engine written in Python. Changes were:

  • Eliminate all the dynamic stuff, to ensure page content does not depend on other pages:
    • macros
    • plug-ins
    • cross-reference links
  • Eliminate all but the necessary code:
    • theming (look is only controlled by CSS)
    • multiple input/output formats
    • etc.
  • Slightly modify the syntax to match Google's Code Wiki Syntax (which is more intuitive in my opinion)

Usage

Just run the statwiki.py in the directory containing the *.wiki files and the corresponding HTML will be generated.

Only the wiki files with a non-existing on older HTML file will be processed. To force a rebuild, previously remove all the HTML files.

Wiki Syntax

The Wiki syntax is the same as Google Code as is described in http://code.google.com/p/support/wiki/WikiSyntax.

Using with SourceForge and Subversion

First create a folder for the wiki in subversion:

svn mkdir https://PROJECTNAME.svn.sourceforge.net/svnroot/PROJECTNAME/wiki

Add the default.css and the content to the wiki.

Checkout the wiki content from within the SourceForge shell:

ssh shell.sourceforge.net
cd /home/groups/P/PR/PROJECTNAME/htdocs
svn co https://PROJECTNAME.svn.sourceforge.net/svnroot/PROJECTNAME/wiki

Put the statwiki source code somewhere.

scp -pr statwiki/ shell.sf.net:/home/groups/P/PR/PROJECTS/statwiki

Create a cronjob:

#!/bin/sh

set -e

GROUP=/home/groups/P/PR/PROJECTNAME
WIKI=$GROUP/htdocs/wiki
STATWIKI=$GROUP/statwiki/statwiki.py

cd $WIKI
svn -q update > /dev/null
$STATWIKI > /dev/null

Examples

You can see a live example of a site generated by statwiki in http://idc.sourceforge.net/

Download

Links

Other wikis with subversion backend support:


Sign in to add a comment
Hosted by Google Code