]> sipb.mit.edu Git - ikiwiki.git/blob - doc/plugins/meta.mdwn
479d62c434034262e000a01f843079b49a2d89e8
[ikiwiki.git] / doc / plugins / meta.mdwn
1 [[template id=plugin name=meta author="[[Joey]]"]]
2 [[tag type/meta]]
3
4 This plugin allows inserting arbitrary metadata into the source of a page.
5 Enter the metadata as follows:
6
7         \[[meta field="value"]]
8         \[[meta field="value" param="value" param="value"]]
9
10 The first form sets a given field to a given value, while the second form
11 also specifies some additional sub-parameters.
12
13 The field values are treated as HTML entity-escaped text, so you can include
14 a quote in the text by writing `"` and so on.
15
16 Supported fields:
17
18 * title
19
20   Overrides the title of the page, which is generally the same as the
21   page name.
22
23   Note that if the title is overridden, a "title_overridden" variable will
24   be set to a true value in the template; this can be used to format things
25   differently in this case.
26
27 * license
28
29   Specifies a license for the page, for example, "GPL". Can contain
30   WikiLinks.
31
32 * copyright
33
34   Specifies the copyright of the page, for example, "Copyright 2007 by
35   Joey Hess". Can contain WikiLinks.
36
37 * author
38
39   Specifies the author of a page.
40
41 * authorurl
42
43   Specifies an url for the author of a page.
44
45 * permalink
46
47   Specifies a permanent link to the page, if different than the page
48   generated by ikiwiki.
49
50 * date
51
52   Specifies the creation date of the page. The date can be entered in
53   nearly any format, since it's parsed by [[cpan TimeDate]].
54
55 * stylesheet
56
57   Adds a stylesheet to a page. The stylesheet is treated as a wiki link to
58   a `.css` file in the wiki, so it cannot be used to add links to external
59   stylesheets. Example:
60
61         \[[meta stylesheet=somestyle rel="alternate stylesheet"
62         title="somestyle"]]
63
64 * openid
65
66   Adds html <link> tags to perform OpenID delegation to an external
67   OpenID server. This lets you use an ikiwiki page as your OpenID. Example:
68
69         \\[[meta openid="http://joeyh.myopenid.com/"
70         server="http://www.myopenid.com/server"]]
71
72 * redir
73
74   Causes the page to redirect to another page in the wiki.
75
76         \[[meta redir=otherpage]]
77
78   Optionally, a delay (in seconds) can be specified. The default is to
79   redirect without delay.
80
81   It can also be used to redirect to an external url. For example:
82
83         \[[meta redir="http://example.com/"]]
84
85   However, this latter syntax won't be allowed if the [[htmlscrubber]] is
86   enabled, since it can be used to insert unsafe content.
87
88   For both cases, an anchor to jump to inside the destination page may also be
89   specified using the common `PAGE#ANCHOR` syntax.
90
91 If the field is not one of the above predefined fields, the metadata will be
92 written to the generated html page as a <meta> header. However, this
93 won't be allowed if the [[htmlscrubber]] is enabled, since it can be used to
94 insert unsafe content.