A very small wiki that takes in Markdown and spits out HTML.
Database setup (assumes $DATABASE_URL
is set):
$ cargo install sqlx-cli
$ sqlx database create
$ sqlx migrate run
$ cargo sqlx prepare -- --bin uwiki
Configuration is done through environment variables.
Required:
DATABASE_URL
: database connection stringASSET_TEMPLATE_PATH
: location of directory containing HTML templated pagesIMAGE_PATH
: location of directory where images will be persisted
Optional:
TOKEN_TTL_SECONDS
: number of seconds a login token is good for (defaults to one week)BIND_ADDRESS
: IP and port to bind the server to (defaults to0.0.0.0:1181
)
index.html.hbs
: Main pagelogin.html.hbs
: Login pagewiki.html.hbs
: Single wiki pageerror.html.hbs
: Page shown when the server hits an erroredit.html.hbs
: Wiki editor pagecreate.html.hbs
: New page creationpage_history.html.hbs
: Page historyupload_image.html.hbs
: New image creationuser.html.hbs
: User homepage