MiniWiki is a tiny wiki engine written in Python designed for small(er) wikis (such as Stack Setup). Features:
- Markdown content
- Inter-page linking (
[[Page Title|/Another/Page]]
or[[/Another/Page]]
) - Index generation based on a path prefix (
[index:/Another]
) - Page history log (WIP)
- Pluggable authentication backend
- Custom template support
-
First, install MiniWiki:
pip install miniwiki
-
Create a Python config file (see config options):
# config.py name = 'My MiniWiki' database = 'sqlite:///my-miniwiki.db'
-
Initialize the database
miniwiki config.py --initdb
-
Run it!
miniwiki config.py
The database variable can be any valid SQLAlchemy database URI.
By default MiniWiki instances allow public editing. The authentication backend can be set via config variable auth_backend
. MiniWiki comes with two builtin backends:
Allows anyone to edit the wiki, usage:
auth_backend = 'miniwiki.auth.AnonymousAuthBackend'
Allows a hard-coded list of users to edit the wiki, usage:
auth_backend = 'miniwiki.auth.SimpleAuthBackend'
auth_backend_settings = {
'users': {
'USERNAME': 'HASHED_PASSWORD',
},
}
You will need to hash the passwords like so:
from bcrypt import hashpw, gensalt
hashed_password = hashpw(b'PASSWORD', gensalt(N_BCRYPT_ROUNDS))