= CKWiki

Welcome to CKWiki. This Wiki is a sample application to introduce CGIKit.

CKWiki has and uses features of Wiki and CGIKit.To understand CGIKit, see source code.

* Page Transition - in general
* Session - in general. recommends to see source of EditPage
* Direct Action - in displaying specified Wiki page. see source of rendering and CKWiki::DirectAction
* Subcomponents - in displaying header
* File Uploading - using Upload element
* Resources - in using CSS and displaying images


== Installation

1. Installing CKWiki
Copy this direcotry to CGI executable path.

2. Copying web server resources
Copy "webresources" directory to document root of web server.
This directory is used to read and save uploaded files by CKWiki.

3. Setting web server resources
Set path of copied web server resources directory.
Specify absolute path at the following in index.cgi.

  app.web_server_resources = '/var/www/...'

3. Setting permissions
Set permissions.

  index.cgi (755) - startup program.
  resources (777) - directory saving Wiki pages.
    FrontPage (666) - Wiki page. you should set permissions for other pages.
  tmp (777) - directory saving temporary files (session, images, etc).


== Trouble shooting
If you see error message "Permission denied ./tmp/session/...", change permissions of directories of CKWiki or tmp.
The reason that the error raises is CGIKit failed saving session into tmp directory.


== Working with WEBrick
You can work CKWiki with WEBrick by using webrick-app.rb.
By default, port is 8080.

  % ruby webrick-app.rb [port]
