File structure
This article is intended for wiki administrators.
Every Mojowiki is stored in one directory. This document explaints the structure of this directory, what files can be there, and what you should do with them.
You can edit all of the files manually, if you want, just do your best to not break anything.
-
config.jsonis the configuration file. It is described in full in the repository'sconfig.md. -
wiki.git/is the Git repository of the wiki, it has all pages in it. You can edit it directly, but do not forget to make Git commits with your changes and reindex your wiki afterwards, with the button in the admin panel. You can also clone it and publish your changes as a proposal. -
A page's text is a file named after the page with the
.mjmextension: the pagehello/worldiswiki.git/hello/world.mjm. A media page is a file named after the page with the extension of its format, such as.png.-
Files named with the old
.mycoextension are not read as pages any more. An administrator can rename them from the Migration section of the admin panel.
-
-
staticholds static data. You can access data there from your wiki with addresses like/static/image.png.-
static/favicon.icois your wiki's favicon, accessed at /favicon.ico by browsers. -
static/base.cssreplaces the engine's base stylesheet — the layout, the box model and the breakpoints — if it exists. It is the whole design rather than a theme, so replacing it is a large change. You probably don't need to. -
static/custom.cssis loaded after the base and after the theme. If you want to make visual changes to your wiki, this is where you should do that. -
static/robots.txtredefines defaultrobots.txtfile.
-
-
tags.jsonis no longer written. Tags live in each page's own data block;categories.json, if your wiki still has one, is read once by the migration in the admin panel and then left alone. -
users.jsonstores the accounts. Passwords are kept as hashes, never as the text you typed. Signed-in sessions are tracked incache/tokens.json. -
interwiki.jsonholds the interwiki configuration. -
cache/holds cached data. If you back up your wiki, you can omit this directory.-
cache/tokens.jsonholds users' tokens. By deleting specific tokens, you can log out users remotely.
-
-
Mojomarkup migration markers are hidden files prefixed with
.mojomarkup-. You should probably not touch them. -
.mojowiki.lockis held by the running wiki, so that a secondmojowikion the same directory refuses to start instead of competing for the Git index. The operating system releases it when the process exits, however it exits, so a crashed wiki does not leave a stale lock behind. Do not delete it to "unlock" a wiki: if a wiki says another process is serving it, one really is. -
.mojowiki-csrf-keyis the key that signs the tokens in the wiki's forms. It is kept so a form left open in a browser still submits after a restart. Delete it and every open page's next submit is refused; nothing else breaks.
Every file whose name starts with a dot is ignored by the page indexer, which is why these can sit in the wiki directory without becoming pages.