]> sipb.mit.edu Git - ikiwiki.git/blob - doc/plugins/meta.mdwn
fix a horrible mispelling
[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 and arbitrary markup.
31
32 * copyright
33
34   Specifies the copyright of the page, for example, "Copyright 2007 by
35   Joey Hess". Can contain WikiLinks and arbitrary markup.
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 * description
46
47   Specifies a "description" of the page. You could use this to provide
48   a summary, for example, to be picked up by the [[map]] plugin.
49
50 * permalink
51
52   Specifies a permanent link to the page, if different than the page
53   generated by ikiwiki.
54
55 * date
56
57   Specifies the creation date of the page. The date can be entered in
58   nearly any format, since it's parsed by [[!cpan TimeDate]].
59
60 * stylesheet
61
62   Adds a stylesheet to a page. The stylesheet is treated as a wiki link to
63   a `.css` file in the wiki, so it cannot be used to add links to external
64   stylesheets. Example:
65
66         \[[!meta stylesheet=somestyle rel="alternate stylesheet"
67         title="somestyle"]]
68
69 * openid
70
71   Adds html <link> tags to perform OpenID delegation to an external
72   OpenID server (for `openid` and `openid2`). An optional `xrds-location`
73   parameter lets you specify the location of any [eXtensible Resource
74   DescriptorS](http://www.windley.com/archives/2007/05/using_xrds.shtml).
75
76   This lets you use an ikiwiki page as your OpenID. Example:
77
78         \\[[!meta openid="http://joeyh.myopenid.com/"
79         server="http://www.myopenid.com/server"
80         xrds-location="http://www.myopenid.com/xrds?username=joeyh.myopenid.com""]]
81
82 * link
83
84   Specifies a link to another page. This can be used as a way to make the
85   wiki treat one page as linking to another without displaying a user-visible
86   [[ikiwiki/WikiLink]]:
87
88        \[[!meta link=otherpage]]
89
90   It can also be used to insert a html <link> tag. For example:
91
92        \[[!meta link="http://joeyh.myopenid.com/" rel="openid.delegate"]]
93
94   However, this latter syntax won't be allowed if the [[htmlscrubber]] is
95   enabled, since it can be used to 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 [[htmlscrubber]] is
111   enabled, since it can be used to insert unsafe content.
112
113   For both cases, an anchor to jump to inside the destination page may also be
114   specified using the common `PAGE#ANCHOR` syntax.
115
116 * robots
117
118   Causes the robots meta tag to be written:
119
120         \[[!meta robots="index, nofollow"]]
121
122   Valid values for the attribute are: "index", "noindex", "follow", and
123   "nofollow". Multiple comma-separated values are allowed, but obviously only
124   some combinations make sense. If there is no robots meta tag, "index,
125   follow" is used as the default.
126
127   The plugin escapes the value, but otherwise does not care about its
128   contents. In particular, it does not check the values against the set of
129   valid values but serves whatever you pass it.
130
131 * guid
132
133   Specifies a globally unique ID for a page. This guid should be a URI
134   (in particular, it can be `urn:uuid:` followed by a UUID, as per
135   [[!rfc 4122]]), and it will be used to identify the page's entry in RSS
136   and Atom feeds. If not given, the default is to use the page's URL as its
137   guid.
138
139   This is mostly useful when a page has moved, to keep the guids for
140   pages unchanged and
141   [[avoid_flooding_aggregators|tips/howto_avoid_flooding_aggregators]].
142
143 If the field is not one of the above predefined fields, the metadata will be
144 written to the generated html page as a <meta> header. However, this
145 won't be allowed if the [[htmlscrubber]] is enabled, since it can be used to
146 insert unsafe content.