Skip to main content

Minisleep - a mini wiki engine

Source: http://halestrom.net/darksleep/software/minisleep

Minisleep - a tiny wiki engine done right.

Minisleep is genuinely small (<1000LOC), has an (optional) graphical page editor with drag-and-drop image support, statically compiles pages to html files, needs almost zero dependencies, is simple to move from server to server and is secure to external attack.

Minisleep is designed to avoid many of the pitfalls encountered by the author when setting up and using other wiki engines:
  • Lists of perl/php/python dependencies.  A wiki should not need 100's of MiB of code to display a few pages.  A few KiB is enough.
  • Complex default page templates.  Templates should be easy to change: simple HTML and CSS with no knowledge of the dark arts required.
  • High time & effort demands for maintenance, especially for fixing breakages after updates.  A good wiki should help you save time, not take your time away.  There is a reason you are not using Sharepoint.
  • Complex security models.  For better or for worse: many people do not know how to (or have the time to) implement and maintain full and proper security on their wikis, so many end up being spammed.  The simpler the security model is the easier it is to prevent this.

Intro

Minisleep is written in POSIX shell.  This is the lowest common denominator across most webhosts, so it should "just work" out of the box for most users.

If you want to try Minisleep then see the 5 minute quickstart section.  This software is designed to be run from wherever it is extracted, no install process is necessary.

Minisleep can be used for almost anything:
  • Project documentation
  • Community wikis
  • Corporate front sites (intended to only be edited by select staff)
  • Personal websites & blogs
However, Minisleep does not have:
  • A user signup form to create accounts.  Accounts must instead be made by the administrator.
  • Page namespaces.  Folders may or may not do what you want instead.
  • Conflict-resolution (for when two people edit a page at the same time).  Last user wins.
  • Table creation support in the WYSIWYG editor.  In the works!
  • Any form of warranty (see the GPL).  This is free software from the internet, use at your own risk.

Downloads

  • Admin page: now provided by the cgi script instead of /misc/admin (as part of the new CSRF protections).  If upgrading: you will need to update your links in buildpage.sh and you will probably want to delete your old admin page/folder.
  • CSRF protection: added.  Auto-generates a per-site key when first used, then works on hashes of this and the user's username.
  • Config: added info on how to set URL_PUBLIC to make Minisleep your root URL site
  • Config: updated HTTPAUTH_MANDATORY info
  • Config: added default umask
  • Added <head> around meta refreshes to improve compatibility with Chromium/Chrome
  • Example server configs: added PDF mimetype to lighttpd conf
  • Typo: replaced "foobar" in license texts
  • action_edit: Fixed an unintentional leak of text to stdin (which broke Yaws compat)
  • Editor CSS: minor changes
  • Favicon now symlinked
  • HTTP auth: updated to support the Litespeed HTTP server, commonly used by shared hosts.
  • Page revisions: now a togglable feature, in case you don't want to store old page versions.
  • Fixed incorrect use of % instead of %% when processing key=value pairs in GET strings
  • Changed David the magician's robes to suit the default site colour scheme better.
  • Some misc small fixes & changes.

2019-08-18: Version 1.10
  • Changed the codebase from bash to POSIX sh.  No longer requires bash.
  • Renamed config (to config.ini) and removed bash-specific features.
  • Removed the (unmentioned) hard dependency on flock.  Now it's used only if available.
  • Fixed the dependencies list.  It was missing some coreutils, this may be important for people on non glibc-linux platforms.
  • Heavily reworked documentation.
  • Fixed WYSIWYG editor form losing focus when editor buttons are clicked.
  • Added HTTPAUTH_MANDATORY option to the config, to provide a layer of protection if/when webserver configurations are accidentally changed.  Otherwise such accidental changes could allow anyone to edit your Minisleep website.
  • Moved the bad-cgi-implementation CONTENT_LENGTH workaround into the main minisleep script.  (used to be in minisleep_lessgreey.cgi).
  • Lots of other small fixes & changes.
  • Fixed several typos in the documentation
  • Worked around variables unintentionally being substituted in the documentation pages.
  • Initial release

Dependencies

  1. Linux (likely works on other *nixes, ask for help if you have problems)
  2. A POSIX-y shell (tested: dash, bash).
  3. GNU coreutils or equivalents (head, tr, cat, cut, sed, realpath, touch).   
  4. A HTTP webserver that supports CGI (tested: lighttpd, apache, hiawatha, Yaws, litespeed).
Optionally: flock (from util-linux) is used if it is available.  This prevents race conditions that can cause page corruption if multiple people submit page edits at the same time.  This is unlikely to be an issue for low-editor count sites; and if you use the web editor then page revisions are automatically backed up to a ds_revisions folder regardless.

GPLv3 or later, copyright William Hales 2019.  Contact minisleep AT halestrom DOT net.