]> sipb.mit.edu Git - ikiwiki.git/blob - doc/ikiwiki/directive/meta.mdwn
fix link text on links to plugins
[ikiwiki.git] / doc / ikiwiki / directive / meta.mdwn
1 The `meta` directive is supplied by the [[!iki plugins/meta desc=meta]] plugin.
2
3 This directive allows inserting arbitrary metadata into the source of a page.
4 Enter the metadata as follows:
5
6         \[[!meta field="value"]]
7         \[[!meta field="value" param="value" param="value"]]
8
9 The first form sets a given field to a given value, while the second form
10 also specifies some additional sub-parameters.
11
12 The field values are treated as HTML entity-escaped text, so you can include
13 a quote in the text by writing `"` and so on.
14
15 Supported fields:
16
17 * title
18
19   Overrides the title of the page, which is generally the same as the
20   page name.
21
22   Note that if the title is overridden, a "title_overridden" variable will
23   be set to a true value in the template; this can be used to format things
24   differently in this case.
25
26 * license
27
28   Specifies a license for the page, for example, "GPL". Can contain
29   WikiLinks and arbitrary markup.
30
31 * copyright
32
33   Specifies the copyright of the page, for example, "Copyright 2007 by
34   Joey Hess". Can contain WikiLinks and arbitrary markup.
35
36 * author
37
38   Specifies the author of a page.
39
40 * authorurl
41
42   Specifies an url for the author of a page.
43
44 * description
45
46   Specifies a "description" of the page. You could use this to provide
47   a summary, for example, to be picked up by the [[map]] directive.
48
49 * permalink
50
51   Specifies a permanent link to the page, if different than the page
52   generated by ikiwiki.
53
54 * date
55
56   Specifies the creation date of the page. The date can be entered in
57   nearly any format, since it's parsed by [[!cpan TimeDate]].
58
59 * stylesheet
60
61   Adds a stylesheet to a page. The stylesheet is treated as a wiki link to
62   a `.css` file in the wiki, so it cannot be used to add links to external
63   stylesheets. Example:
64
65         \[[!meta stylesheet=somestyle rel="alternate stylesheet"
66         title="somestyle"]]
67
68 * openid
69
70   Adds html <link> tags to perform OpenID delegation to an external
71   OpenID server (for `openid` and `openid2`). An optional `xrds-location`
72   parameter lets you specify the location of any [eXtensible Resource
73   DescriptorS](http://www.windley.com/archives/2007/05/using_xrds.shtml).
74
75   This lets you use an ikiwiki page as your OpenID. Example:
76
77         \\[[!meta openid="http://joeyh.myopenid.com/"
78         server="http://www.myopenid.com/server"
79         xrds-location="http://www.myopenid.com/xrds?username=joeyh.myopenid.com""]]
80
81 * link
82
83   Specifies a link to another page. This can be used as a way to make the
84   wiki treat one page as linking to another without displaying a user-visible
85   [[ikiwiki/WikiLink]]:
86
87        \[[!meta link=otherpage]]
88
89   It can also be used to insert a html <link> tag. For example:
90
91        \[[!meta link="http://joeyh.myopenid.com/" rel="openid.delegate"]]
92
93   However, this latter syntax won't be allowed if the 
94   [[!iki plugins/htmlscrubber desc=htmlscrubber]] plugin is enabled, since it can be used to
95   insert unsafe content.
96
97 * redir
98
99   Causes the page to redirect to another page in the wiki.
100
101         \[[!meta redir=otherpage]]
102
103   Optionally, a delay (in seconds) can be specified. The default is to
104   redirect without delay.
105
106   It can also be used to redirect to an external url. For example:
107
108         \[[!meta redir="http://example.com/"]]
109
110   However, this latter syntax won't be allowed if the 
111   [[!iki plugins/htmlscrubber desc=htmlscrubber]] plugin is enabled, since it can be used to
112   insert unsafe content.
113
114   For both cases, an anchor to jump to inside the destination page may also be
115   specified using the common `#ANCHOR` syntax.
116
117 * robots
118
119   Causes the robots meta tag to be written:
120
121         \[[!meta robots="index, nofollow"]]
122
123   Valid values for the attribute are: "index", "noindex", "follow", and
124   "nofollow". Multiple comma-separated values are allowed, but obviously only
125   some combinations make sense. If there is no robots meta tag, "index,
126   follow" is used as the default.
127
128   The value is escaped, but its contents are not otherwise checked.
129
130 * guid
131
132   Specifies a globally unique ID for a page. This guid should be a URI
133   (in particular, it can be `urn:uuid:` followed by a UUID, as per
134   [[!rfc 4122]]), and it will be used to identify the page's entry in RSS
135   and Atom feeds. If not given, the default is to use the page's URL as its
136   guid.
137
138   This is mostly useful when a page has moved, to keep the guids for
139   pages unchanged and avoid_flooding_aggregators
140   (see [[!iki tips/howto_avoid_flooding_aggregators]]).
141
142 If the field is not one of the above predefined fields, the metadata will be
143 written to the generated html page as a <meta> header. However, this
144 won't be allowed if the [[!iki plugins/htmlscrubber desc=htmlscrubber]] plugin is enabled,
145 since it can be used to insert unsafe content.
146
147 [[!meta robots="noindex, follow"]]