Pure Dirt

Markdown

This is a guide to using markdown, which you'll want to look at when making nice formatting on wiki pages. Markdown is easier to write than raw HTML so it's very handy. If you try adding raw HTML to an article it will appear literally (<p>).

Some of the basics...

Headers

You can create section headers with hash symbols (#). The more hash symbols you use (up to 6), the smaller the header will be. The above "Headers" section is a level 3 header, written as "### Headers". If you are familiar with HTML, these header levels map to <h1> to <h6>.

Here are some more headers of various levels just to give you an idea of their sizes:

Huge header (1 #)

Smallest header (6 #s)

Paragraphs and formatting

Paragraphs are separated with one blank line. If you check out the source for this article you'll see that this sentence is on the next line from the previous one. If I'd put a blank line in between them, they'd be formatted as different paragraphs.

Like this!

You'll also notice that I used italics in the last paragraph. This was achieved by surrounding the word in star signs (*). If we use double star signs then the word(s) will appear bold.

Underscores can also be used for the same purpose. This is important to keep in mind in situations where you might use underscore_separated_words, which brings us onto the next section:

Escaping

To write the underscore_separated_words in the previous section I had to escape them. This is when we prepend a markdown character with a backslash (\) to tell it not to interpret the character is a formatting feature, but rather to print it literally.

So, to talk about escaping with backslashes one would type "\\" and to say that I had to type "\\\\". It can look a bit ridiculous at times but these are extreme examples. (When was the last time you typed \\\\ in a real situation?)

Linking

External links

Links are one of the magical things about hypertext and one of the most useful features in organising a wiki. We write them in two stages; first the link text, which is how the link will appear on the page, and then link itself, which is the URL we want to link to.

The link text is surrounded by square brackets ([text]) and the link itself is surrounded by regular parentheses ((url)).

A full example would look like [example](http://www.example.com). This renders as example.

Just a note to say that in most situations you don't need to worry about escaping parentheses, since markdown will ignore them in situations that don't follow a square bracketed word.

Wiki links

Creating links to other pages on the wiki, as well as to any other page on this site, is also easy. These links are called relative links, and you can think of the URL as just the part which comes after puredirt.org. So, to link to puredirt.org/wiki/markdown, we use as our URL "/wiki/markdown".

[markdown](/wiki/markdown) becomes markdown.

Lists

Just as there are two types of link, there are two types of list:

  • Unordered
  • Ordered

Unordered lists, as seen above, are written as a series of lines starting with an asterisk (*). You can also use pluses and hyphens (+s and -), and you can also mix and match these symbols freely.

Ordered lists are similar but the lines start with numbers. It's good to note that you can use any number at the start of these lines. This is super handy when removing an item from a really long list since you don't have to update ever number on the list.

Here's an example of how ordered lists look:

  1. Do
  2. Re
  3. Mi