Squeak 3.7 based Swiki implemenation
Last updated at 10:48 am UTC on 17 November 2018
There is a ready make Swiki setup based on Squeak 3.7. It works out of the box. For a local wiki for example.
It is a regular Squeak .image file preloaded with the code to run a wiki.
After you have opened the image there are instructions how to do the configuration. The configuration is simple. Maybe 10 minutes.
The setup allows you to have several wikis. All the wikis are in a root folder called 'swiki'.
The files for each wiki are in a subfolder of the 'swiki' folder.
- pages (contains the XML files with the actual data)
The port number depends on the configuration
Example of the file format used to store pages
The wiki pages are store in the 'pages' subfolder. They are stored as wiki markup text wrapped in some XML.
<version date="30/6/2018" time="1:43:21 am" user="localhost" />
<text>!!! Heading with 3 exclamation marks
!! Heading with 2 exclamation marks
! Heading with 1 exclamation mark
The Pillar syntax is based on the markup of this wiki but there are some differences.
The ComSwiki Launcher has three buttons
1. "start / stop server" : this depends on the status
2. "save and exit" : this applies to the Squeak image
3. "port: nnnn" : this allows to change the port
There is a class 'ComSwikiLauncher' with a class method
^ self openAsMorphPackage: #swikiWebServer
The method used #swikiWebServer is implemented in class SwikiModule.
That method uses
FileDirectory default directoryNamed: 'swiki'
to find the swiki folder. Thus it is assumed that the swiki folder needs to stay in the folder where the .image file file is.
You may easily change that to a different location and/or foldername by applying a relative path
FileDirectory default directoryNamed: '../../hswiki'
Thus the wiki folder is in the grandparent folder in relation to the folder where the image is.
The image file also contains a wiki 'refs' (i.e. a subdirectory called 'refs')
gives you access to documentation
describes the architecture.