Pandoc Powered Wiki

File Structure

  • /markup - markup files with online edit support
  • /templates - template files where converted markup files are included
  • /public - static unmodifiable common files (images, stylesheets and javascript)
  • /public/files - uploaded files with online edit support
  • /public - converted template/markup files


View page

GET: `/route/page`

Server just return static pre-generated file from /public/ folder. This can be handled by web server directly.

Edit page

GET: `/edit/route/page`

Post update

POST: `/edit/route/page`
  1. Tries to convert markup via rendering engine (pandoc) and store converted file to /public/published
  2. New page references are extracted and created as new empty pages
  3. Commit change to version control system (hg)
  4. Then an automatic redirect to view page

A page meta header can include:

  • Current markup for page
  • Meta: Markup language
  • Meta: Template

Upload file

Handle file upload to /public/files

Version history and revert

Show version history from vcs and support revert to a previous version

Special markup

<!include page> - include one page in another

Also templates may include a page which makes it possible to have a dynamic header, footer and navigation.