(no commit message)
[ikiwiki.git] / ikiwiki / formatting.mdwn
1 [[!meta title="Formatting wiki pages"]]
2 [[!meta robots="noindex, follow"]]
3
4 Text on this wiki is, by default, written in the [[MarkDown]] format, which is very close to how you might write text for an email, and here is a good [MarkDown Cheatsheet](https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet).
5 The following are some basic syntax and rules:
6
7 Leave blank lines between paragraphs.
8
9 You can *\*emphasize\** or **\*\*strongly emphasize\*\*** text by placing it
10 in single or double asterisks.
11
12 To create a list, start each line with an asterisk:
13
14 * `* this is my list`
15 * `* another item`
16
17 To make a numbered list, start each line with a number (any number will
18 do) followed by a period:
19
20 1. `1. first line`
21 2. `2. second line`
22 2. `2. third line`
23
24 To create a header, start a line with one or more `#` characters followed
25 by a space and the header text. The number of `#` characters controls the
26 size of the header:
27
28 # # h1
29 ## ## h2
30 ### ### h3
31 #### #### h4
32 ##### ##### h5
33 ###### ###### h6
34
35 To create a horizontal rule, just write three or more dashes or stars on
36 their own line:
37
38 ----
39
40 To quote someone, prefix the quote with `>`:
41
42 > To be or not to be,
43 > that is the question.
44
45 To write a code block, indent each line with a Tab or 4 spaces:
46
47         10 PRINT "Hello, world!"
48         20 GOTO 10
49
50 To link to an URL or email address, you can just put the
51 URL in double-angle brackets: <<http://ikiwiki.info>>, or you can use the
52 form `[link text](url)`
53
54 ----
55
56 In addition to basic HTML formatting using [[MarkDown]], this wiki lets
57 you use the following additional features:
58
59 * To link to another page on the wiki, place the page's name inside double
60   square brackets. So you would use `\[[WikiLink]]` to link to [[WikiLink]].
61
62 [[!if test="enabled(smiley) and smileys" then="""
63 * Insert [[smileys]] and some other useful symbols. :-)
64 """]]
65
66 [[!if test="enabled(shortcut) and shortcuts" then="""
67 * Use [[shortcuts]] to link to common resources.
68
69         \[[!wikipedia War\_of\_1812]]
70 """]]
71
72 [[!if test="enabled(template) and templates" then="""
73 * Create and fill out [[templates]] for repeated chunks of
74   parameterized wiki text.
75 """]]
76
77 * Insert various [[directives|directive]] onto a page to perform useful
78   actions.
79 [[!if test="enabled(toc) or enabled(meta) or enabled(inline)" then="""
80   For example, you can:
81 """]]
82
83 [[!if test="enabled(toc)" then="""
84   * Add a table of contents to a page:
85
86         \[[!toc]]
87 """]]
88
89
90 [[!if test="enabled(meta)" then="""
91   * Change the title of a page:
92
93         \[[!meta title="full page title"]]
94 """]]
95
96 [[!if test="enabled(inline)" then="""
97   * Create a blog by inlining a set of pages:
98
99         \[[!inline pages="blog/*"]]
100 """]]
101
102 [[!if test="enabled(listdirectives)" then="""
103   Full list of [[directives|directive]] enabled for this wiki:
104   [[!listdirectives ]]
105 """]]
106