]> sipb.mit.edu Git - ikiwiki.git/blob - doc/ikiwiki/directive/format.mdwn
Merge branch 'master' into sipb
[ikiwiki.git] / doc / ikiwiki / directive / format.mdwn
1 The `format` directive is supplied by the [[!iki plugins/format desc=format]]
2 plugin.
3
4 The directive allows formatting a chunk of text using any available page
5 format. It takes two parameters. First is the type of format to use,
6 ie the extension that would be used for a standalone file of this type.
7 Second is the text to format.
8
9 For example, this will embed an otl outline inside a page using mdwn or
10 some other format:
11
12         \[[!format otl """
13         foo
14                 1
15                 2
16         bar
17                 3
18                 4
19         """]]
20
21 Note that if the [[!iki plugins/highlight desc=highlight]] plugin is enabled, this directive can also be
22 used to display syntax highlighted code. Many languages and formats are
23 supported. For example:
24
25         \[[!format perl """
26         print "hello, world\n";
27         """]]
28
29 [[!meta robots="noindex, follow"]]