meta:style_guide

This is an old revision of the document!


Style Guide

(Right now this is less of a real style guide, but more of a “what to watch for so DokuWiki works right” document. For now the general style guideline is “just try to match the layout of the other pages in the namespace” I guess)

Creating Pages

There's a little “Create new page” button in the sidebar if you're logged in. This will create a new page in the current namespace - so if you want to make a new page in Calculations, visit a page there, then hit the button on it.

The new page form will automatically convert the page title you enter into the proper URL format and open the editor. You can also create new sub-namespaces from there if neccessary.

Headlines and Sections

There should be exactly one H1 headline on each page:

====== H1 Headline ======

DokuWiki will use the text in this heading as the page title and display it in all navigation related places (links, browser tabs, breadcrumbs, sitemap, namespace listings…).

To format the rest of the page into sections, you should only use H2 headlines and lower (by either using the “Lower Headline” or “Select Headline” buttons in the editor):

===== H2 Headline =====
==== H3 Headline ====
=== H4 Headline ===
== H5 Headline ==

Manually adding horizontal lines (—-) is not neccessary.

Because DokuWiki uses the H1 Heading as the page title, you don't need to specify a link label for intrawiki links. [[gameplay:accessories|]] results in the same link as [[gameplay:accessories|Accessories]], since DokuWiki will automatically load the page title for the former. In fact, the first one is better, because it will automatically update if the page title is changed.

Extra Syntax

Base syntax of the wiki is documented on the DokuWiki site: syntax

This wiki has some plugins to allow for some more syntax. Some of them are available as buttons in the editor, others are not, so here's a few of those. This is not all - but if you see something not covered and you're curious about how it works, you can just edit the page where it's used, and look at the markdown or just copypaste it.

TeX

TeX can be used to make nice and beautiful math. Open a math environment as you would in a TeX document. In there, you can do almost anything you can do with TeX, including math symbols or opening more environments using \begin.

TeX can be inlined: $x=5$ or put in a seperate paragraph: $$a^2 = 3 \cdot \frac{a}{2}$$
TeX can be inlined: $x=5$ or put in a seperate paragraph: $$a^2 = 3 \cdot \frac{a}{2}$$

Right Floating Wrap

Floating wraps are useful for putting infoboxes, images, videos or anything else on the side.

<WRAP right>text</WRAP>

One other useful wrap is the “clear” wrap, which will add empty space to the text until the floating wrap is over, like here. You should use it if you have a long floating wrap, but only a short text, so the next section doesn't get mushed next to the float as well. You can find it in the Wrap menu in the editor (⏏ symbol, “clear floats”).

YouTube Embed

{{youtube>VIDEOID}}

The video ID is taken from the YouTube URL (the part at the end - for example, for https://www.youtube.com/watch?v=yRZPhvonGB8 the video ID is yRZPhvonGB8).

Graphs

The ApexCharts plugin allows you to make fancy interactive graphs. Check the ApexCharts examples page to see what is possible.

To use an ApexChart here, copy the value of what would be in the options array (everything inside and including {…}) and put it between <achart> tags. Take a look at the source of Bonus Costumes for an example of it in action.

Tabs

<tabbox The First Tab Title> 
Hello, I am the first tab.
<tabbox The Other Tab Title> 
Look at me, I am more text.
</tabbox>

The First Tab Title

Hello, I am the first tab.

The Other Tab Title

Look at me, I am more text.


Contributors to this page:
meta/style_guide.1636723408.txt.gz · Last modified: 2021/11/12 13:23 by Suyooo