Dokuwiki

**This is an old revision of the document!**

Dokuwiki

dma.space operates a Dokuwiki instance at wiki.dma.space.

Markdown by Default

Our Dokuwiki instance runs the Commonmark plugin, which is configured to treat every page as Markdown files by default. To create a page, you just type in normal Markdown, and it just works.

This plugin has a few quirks that you should keep in mind:

  • Some inline Dokuwiki syntax are still supported. For example, the “Add image” button in the editor still works, even though it inserts Dokuwiki markup.
  • Some Commonmark syntax are parsed incorrectly by the plugin. For example, list items with multiple text paragraphs are not supported.
  • You may add custom Dokuwiki markup into the space by opening a code block with a dokuwiki language. The main page utilizes this; just look at its source code.

Namespacing

Dokuwiki uses this concept of a “namespace”. You may understand it as folders that files go in.

For example, :hardware:nixos-boxes means that the page or namespace nixos-boxes sits inside the hardware namespace. As paths, it would be written as /hardware/nixos-boxes (this format is used in URLs).

Keep in mind that a namespace starts out as a page, and that pages can become namespaces later on. For example, the page at :hardware:nixos-boxes can become a namespace if we just create a page underneath it, e.g. at :hardware:nixos-boxes:example. As folders, this would be akin to having a README.md file and a bunch of children folders next to it.

Creating a Page

Dokuwiki doesn't have a straightforward way of creating a new page, but we made it easier with a plugin. You can see this plugin at the bottom of the main page as a simple input box:

To create a new page using this input box:

  1. Select an existing category on the left dropdown input (shown above).
  2. Type in the slug of the page (i.e. hyphenated words such as “this-page”, NOT the actual name like “This page”).
  3. Click Add page.

Once you're on the editing page, give the page a title in Markdown format on the first line, e.g. # This page, then hit Save. This will automatically create the page.

Creating a Namespace

There is no straightforward button for creating a namespace, but you can do so using the same “Add page” input box above.

For example, if :hardware:nixos-boxes is currently a page, and I want to make a page underneath that page, I would select hardware as the namespace, and type in :nixos-boxes:new-page as the slug.

I could also keep the namespace selector as Root and create a page with the slug :hardware:nixos-boxes:new-page. This does the same thing.

To start with, namespace pages should start out with its title and a small list of its inner pages, if possible. Here's a copy-paste template:

# Namespace Name

**Pages:**

```dokuwiki
<catlist :path:to:namespace -noHead>
```

Theming

Our instance uses a patched version of the Mikio template. We patched it to change its colors to better fit dma.space's branding, and to make it work better on mobile and on non-JavaScript environments.

These patchsets are maintained by a set of NixOS configurations. See NixOS Boxes for more information.