A Wiki in a box
Pepperminty Wiki is a complete wiki contained in a single file, inspired by @am2064's Minty Wiki. It's open source too (under MPL-2.0), so contributions are welcome!
Developed by Starbeamrainbowlabs (though contributions from others are welcome!), Pepperminty Wiki has a variety of useful (and cool!) features - such as file upload, a dynamic help page, page revision history, page tags, and more! Other amazing features are in the works too (like threaded page commenting, autoupdate, and user settings), so check the release notes to see what's been added recently.
Latest Version: v0.12.1 (stable) v0.13-dev (development)
Above: The Main Page used for testing purposes.
- Configurable settings
- User login system
- Page creation
- Sub pages
- Markdown-powered syntax
- Templating support
- Additional syntax for resizing and floating images
- File galleries
- Short syntax for referencing uploaded files
- Client side mathematical expression parsing, courtesy of MathJax
- Links to non-existent pages appear red
- Full page revision history (comparison / manipulation coming soon)
- Optional time-delayed google search indexing
- Simple edit conflict detection
- Internal links
- Links to non-existent pages show up in red
- Printable page view
- Customisable theme
Basic 'search' barA full text search engine!
- Dynamic server-side suggestions (coming in v0.13!)
- (Optional) Sidebar with a tree of all the current pages
- List of all pages and details
- List of all tags and pages with any given tag
- List of recent changes
- Inbuilt help page (modules can add their own sections to it)
- File upload and preview
- Simple syntax for including media in a page (explanation on help page)
- Page protection
- Customisable module based system
- Allows you to add or remove features at will
A Live demo of the latest stable version can be found over at my website
- PHP-enabled webserver
- PHP session support (for logging in, see here for more information)
- The following PHP extensions: mbstring, imagick (for preview generation), fileinfo (for proper mime type checking of uploaded files), and zip (for compress exports)
- Write access to own folder (only for editing)
Getting your own copy
Setting up your own copy of Pepperminty Wiki is easy. Since Pepperminty Wiki works on a module based system, all you need to do is choose the modules you want installed, and then configure your new installation so that it fits your needs. There are several ways to do this:
Method 1: Using the latest pre-built stable release
If you want a pre-built stable version, then you can use the latest release. It has a changelog that tells you what has changed since the last release, along with a pre-built version with all the latest modules.
Method 2: Grabbing the pre-built verion from the repository
If you're feeling lazy, you can grab the bleeding-edge version from this respository, which comes with all the latest modules. You can get it here.
Method 3: Using the online downloader
Pepperminty Wiki has a downloader that you can use to select the modules you want to include in your install. The online downloader will give you the latest stable release. You can find it here.
Method 3.5: Using the downloader offline
You can also you the downloader offline. Simply clone this repository to your web server and then point your web browser at
Method 4: Building your own from source
Pepperminty Wiki can also be built from source (and I do this all the time when testing). Start by cloning the repository. Then go into the
modules folder and append
.disabled to the names of any modules you don't want to be included (e.g.
modules/page-edit.php would become
modules/page-edit.php.disabled). Then follow the instructions for your platform:
Simply run the
build.bat script in the root of the repository. It will handle everything for you.
Linux and Everyone Else
Run the following commands from the root of the repository in order, adjusting them for your specific platform (these are for a standard Ubuntu Server install):
rm build/index.php php rebuild_module_index.php php build.php
These commands are also in
build.sh. You can run that if you want. Here's an explanation of what each command does:
- Deletes the old
index.phpin the build folder that comes with the repository
- Rebuilds the module index that the build scripts uses to determine what modules it should include when building
- Actually builds Pepperminty Wiki. Outputs to
To configure your new install, make sure that you've loaded the wiki in your browser at least once. Then open
peppermint.json in your favourite text editor. An explanation of each of the settings can be found below. If you need any help, just contact me or open an issue.
Please note that configuration of Pepperminty Wiki will be done through a GUI soon.
Below are all the configuration directives that Pepperminty Wiki (and all the modules included in the repository) understand.
||string||The site's name. Used all over the place. Note that by default the session cookie is prefixed with a variant of the sitename, so changing this will log everyone out!|
||url||A url that points to the site's logo. Leave blank to disable. When enabled, the logo will be inserted next to the site name on every page.|
||url||The url from which to fetch updates. Defaults to the master (development) branch. If there is sufficient demand, a separate stable branch will be created. Note that if you use the automatic updater currently it won't save your module choices. MAKE SURE THAT THIS POINTS TO A HTTPS URL, OTHERWISE SOMEONE COULD INJECT A VIRUS INTO YOUR WIKI!|
||string||The secret key used to perform 'dangerous' actions, like updating the wiki. It is strongly advised that you change this!|
||integer||The amount of time, in seconds, that pages should be blocked from being indexed by search engines after their last edit. Set to 0 to disable. This is called delayed indexing. More information can be found here.|
||boolean||Determines whether editing is enabled. Set to false to disable disting for all users (anonymous or otherwise).|
||integer||The maximum number of characters allowed on a single page. The default is 135,000 characters, which is about 50 pages.|
||boolean||Whether page sources should be cleaned of HTML before rendering. If set to true any raw HTML will be escaped before rendering. Note that this shouldn't affect code blocks - they should alwys be escaped. It is STRONGLY recommended that you keep this option turned on, ESPECIALLY if you allow anonymous edits as no sanitizing whatsoever is performed on the HTML. If you need a feature that the markdown parser doesn't have, please open an issue. Also note that some parsers may override this setting and escape HTML sequences anyway.|
||boolean||Whether to enable client side mathematical expression parsing. When enabled LaTeX mathematical expressions can be enclosed in dollar signs like so:
||boolean||Determines whether users who aren't logged in are allowed to edit your wiki. Set to true to allow anonymous users to edit the wiki.|
||string||The name of the page that will act as the home page for the wiki. This page will be served if the user didn't specify a page.|
||action name||The default action. This action will be performed if no other action is specified. It is recommended you set this to "view" - that way the user automatically views the default page (see above).|
||parser name||The parser to use when rendering pages. Defaults to 'default', which is a modified version of slimdown, originally written by Johnny Broadway.|
||boolean||Whether to show a list of subpages at the bottom of the page.|
||number||The depth to which we should display when listing subpages at the bottom of the page.|
||number||The maximum number of recent changes to display on the recent changes page.|
||boolean||Whether to optimise all webpages generated. Currently this option only minifies inline css.|
||array of users||An array of usernames and passwords - passwords should be hashed with sha256. Put one user / password on each line, remembering the comma at the end. The last user in the list doesn't need a comma after their details though. Tip: use the
||boolean||Whether to require that users login before they do anything else. If you combine this setting with the
||path||The directory in which to store all files, except this main index.php. A single dot ('.') denotes the current directory. Remember to omit the trailing slash from the directory name, as it is added automatically by Pepperminty Wiki. Combine with
||boolean||Whether to use the new sha3 hashing algorithm that was standardised on the 8th August 2015. Only works if you have strawbrary's sha3 extension installed. Get it here: https://github.com/strawbrary/php-sha3 Note: If you change this settings, make sure to update the password hashes above! Note that the
||array of usernames||An array of usernames that are administrators. Administrators can delete and move pages.|
||string||The string that is prepended before an admin's name on the nav bar. Defaults to a diamond shape (◆).|
||string||The string that is prepended a page's name in the page title if it is protected. Defaults to a lock symbol. (
||string||The name of the site administrator. Since users can only be added by editing the settings file, people will need a contact name and address to use to ask for an account. Displayed at the bottom of the page.|
||string||The email address of the site administrator. Used in conjunction with the above. Will be appropriately obfusticated to deter spammers when displayed.|
||boolean||Whether to only allow adminstrators to export the your wiki as a zip using the page-export module.|
||array||An array of links and display text to display at the top of the site. See the comment in the settings file for more details.|
||array||An array of additional links in the above format that will be shown under "More" subsection, in the same format as the above.|
||array||An array of links in the above format that will be shown at the bottom of the page, the same format as the above 2.|
||string( + HTML)||A message that will appear at the bottom of every page. May contain HTML.|
||string( + HTML)||A message that will appear just before the submit button on the editing page. May contain HTML.|
||boolean||Whether to allow image uploads to the server.|
||array of strings||An array of mime types that are allowed to be uploaded. Note that Pepperminty Wiki only does minimal checking of the actual content that is being uploaded - so please don't add any dangerous file types here on a parmanant bases for your own safety!|
||mime type||The default file type for previews. Defaults to image/png. Also supports
||number||The default size of preview images.|
||path||The location of a file that maps mime types onto file extensions and vice versa. Used to generate the file extension for an uploaded file. Set to the default location of the mime.types file on Linux. If you aren't using linux, download this pastebin and point this setting at it instead.|
||array of strings||An array of override mime mappings to translate mime types into the appropriate file extension. Use if the file pointed to by the above assigns weird file extensions to any file types.|
||number||The minimum allowed size for generated preview images in pixels.|
||number||The maximum allowed size for generated preview images in pixels.|
||number||The number of characters that should be displayed either side of a matching term in the context below each search result.|
||number||The weighting to give to search term matches found in a page's title.|
||number||The weighting to give to search term matches found in a page's tags.|
||string of css||A string of css to include. Will be included in every page. This may also be an absolute url that references an external stylesheet.|
||url||A url that points to the favicon for your wiki.|
||string||The prefix that should be used in the names of the session variables. Defaults to an all lower case version of the site name with all non alphanumeric characters removed (The special value
Module API Reference
I have documented (most of) the current API that you can use to create your own modules. You can find it in the Module_API_Docs.md file in this repository.
If you do create a module, I'd love to hear about it. Even better, send a pull request!
Real World Usage
None yet! Contact me or open an issue and tell me about where you are using Pepperminty Wiki and I'll add you to this section!
Here's a list of things that I want to add at some point (please feel free to send a pull request and help out!).
- Better page history (revert to revision, compare revisions, etc.)
- User settings like avatars, changing own passsword, etc. (#69 needs fixing first, then #107)
- Intelligent auto-updating system that doesn't wipe your settings / module choices
- A module registry of some sort (ideas welcome!)
- Preview changes before you save them (#59)
- Threaded page commenting system (#19)
- Image maps (#103)
- (See more on the issue tracker!)
Pepperminty Wiki is released under the Mozilla Public License 2.0. The full license text is included in the
LICENSE file in this repository.