summaryrefslogtreecommitdiff
path: root/doc/plugins/contrib
diff options
context:
space:
mode:
Diffstat (limited to 'doc/plugins/contrib')
-rw-r--r--doc/plugins/contrib/album.mdwn174
-rw-r--r--doc/plugins/contrib/album/discussion.mdwn41
-rw-r--r--doc/plugins/contrib/field.mdwn138
-rw-r--r--doc/plugins/contrib/field/discussion.mdwn326
-rw-r--r--doc/plugins/contrib/flattr.mdwn45
-rw-r--r--doc/plugins/contrib/flattr/discussion.mdwn9
-rw-r--r--doc/plugins/contrib/ftemplate.mdwn25
-rw-r--r--doc/plugins/contrib/ftemplate/discussion.mdwn33
-rw-r--r--doc/plugins/contrib/ftemplate/ikiwiki/directive/ftemplate.mdwn106
-rw-r--r--doc/plugins/contrib/getfield.mdwn131
-rw-r--r--doc/plugins/contrib/getfield/discussion.mdwn32
-rw-r--r--doc/plugins/contrib/highlightcode.mdwn2
-rw-r--r--doc/plugins/contrib/pod/discussion.mdwn14
-rw-r--r--doc/plugins/contrib/postal.mdwn2
-rw-r--r--doc/plugins/contrib/report.mdwn26
-rw-r--r--doc/plugins/contrib/report/discussion.mdwn75
-rw-r--r--doc/plugins/contrib/report/ikiwiki/directive/report.mdwn149
-rw-r--r--doc/plugins/contrib/tracking.mdwn30
-rw-r--r--doc/plugins/contrib/xslt/discussion.mdwn27
-rw-r--r--doc/plugins/contrib/ymlfront.mdwn103
-rw-r--r--doc/plugins/contrib/ymlfront/discussion.mdwn13
21 files changed, 1412 insertions, 89 deletions
diff --git a/doc/plugins/contrib/album.mdwn b/doc/plugins/contrib/album.mdwn
index 395c99bce..3cfcb68d4 100644
--- a/doc/plugins/contrib/album.mdwn
+++ b/doc/plugins/contrib/album.mdwn
@@ -9,9 +9,11 @@ thoughts about this plugin).
This plugin formats a collection of images into a photo album,
in the same way as many websites: good examples include the
PHP application [Gallery](http://gallery.menalto.com/), Flickr,
-and Facebook's Photos "application". I've called it `album`
-to distinguish it from [[contrib/gallery|plugins/contrib/gallery]],
-although `gallery` might well be a better name for this functionality.
+and Facebook's Photos "application".
+
+I've called it `album` to distinguish it from
+[[contrib/gallery|plugins/contrib/gallery]], although `gallery` might well be
+a better name for this functionality.
The web UI I'm trying to achieve consists of one
[HTML page of thumbnails](http://www.pseudorandom.co.uk/2008/2008-03-08-panic-cell-gig/)
@@ -26,83 +28,129 @@ individual photos can't be bookmarked in a meaningful way, and
the best it can do as a fallback for non-Javascript browsers
is to provide a direct link to the image.)
-## Writing the viewers
+<h2 id="album"><code>album</code> directive</h2>
+
+Each page containing an `album` directive is treated as a photo album.
+
+Every image attached to an album or its subpages is considered to be part of
+the album. A "viewer" page, with the wiki's default page extension, will be
+generated to display the image, if there isn't already a page of the same
+name as the image: for instance, if `debconf` is an album and
+`debconf/tuesday/p100.jpg` exists, then `debconf/tuesday/p100.mdwn` might
+be created.
+
+There's currently a hard-coded list of extensions that are treated as images:
+`png`, `gif`, `jpg`, `jpeg` or `mov` files. More image and video types could
+be added in future. Videos aren't currently handled very well;
+ideally, something like totem-video-thumbnailer would be used.
+
+The `album` directive also produces an [[ikiwiki/directive/inline]] which
+automatically includes all the viewers for this album, except those that
+will appear in an <a href="#albumsection">albumsection</a> (if every image
+is in a section, then the `album` directive won't have any visible effect).
- \[[!albumimage image=foo.jpg album=myalbum
- title=...
- caption=...
- copyright=...
- size=...
- viewertemplate=...
- ]]
+The `inline` is in `archive` and `quick` mode, but can include some
+extra information about the images, including file size and a thumbnail made
+using [[ikiwiki/directive/img]]). The default template is `albumitem.tmpl`,
+which takes advantage of these things.
-Each viewer contains one `\[[!albumimage]]` directive. This
-sets the `image` filename, the `album` in which this image appears,
-and an optional `caption`, and can override the `size` at which to
-display the image and the `viewertemplate` to use to display the
-image.
+<h2 id="albumsection"><code>albumsection</code> directive</h2>
-It can also have `title`, `copyright` and `date` parameters, which
-are short-cuts for [[ikiwiki/directive/meta]] directives.
+The `albumsection` directive is used to split an album into sections. It can
+only appear on a page that also has the <a href="#album">album</a> directive.
+
+The `filter` parameter is a [[ikiwiki/PageSpec]] against which viewer pages
+are matched. The `albumsection` directive displays all the images that match
+the filter, and the `album` directive displays any leftover images, like
+this:
+
+ # Holiday photos
+
+ \[[!album]]
+ <!-- replaced with a list of any uncategorized photos, which might be
+ empty -->
-The viewer can also have any other content, but typically the
-directive will be the only thing there.
+ ## People
-Eventually, there will be a specialized CGI user interface to
-edit all the photos of an album at once, upload a new photo
-(which will attach the photo but also write out a viewer page
-for it), or mark an already-uploaded photo as a member of an
-album (which is done by writing out a viewer page for it).
+ \[[!albumsection filter="tagged(people)"]]
+ <!-- replaced with a list of photos tagged 'people', including
+ any that are also tagged 'landscapes' -->
-The `\[[!albumimage]]` directive is replaced by an
+ ## Landscapes
+
+ \[[!albumsection filter="tagged(landscapes)"]]
+ <!-- replaced with a list of photos tagged 'landscapes', including
+ any that are also tagged 'people' -->
+
+<h2 id="albumimage"><code>albumimage</code> directive</h2>
+
+Each viewer page produced by the <a href="#album">album</a> directive
+contains an `albumimage` directive, which is replaced by an
[[ikiwiki/directive/img]], wrapped in some formatting using a
-template (by default `albumviewer.tmpl`). The template can (and
-should) also include "next photo", "previous photo" and
-"up to gallery" links.
+template (by default it's `albumviewer.tmpl`). That template can also include
+links to the next photo, the previous photo and the album it's in; the default
+template has all of these.
-The next/previous links are themselves implemented by
-[[inlining|ikiwiki/directive/inline]] the next or previous
-photo, using a special template (by default `albumnext.tmpl`
-or `albumprev.tmpl`), in `archive`/`quick` mode.
+The next/previous links are themselves implemented by evaluating a template,
+either `albumnext.tmpl` or `albumprev.tmpl` by default.
-> With hindsight, using an inline here is wrong - I should just
-> run hooks and fill in the template within the album plugin.
-> inline has some specialized functionality that's overkill
-> here, and its delayed HTML substitution breaks the ability
-> to have previous/up/next links both above and below the
-> photo, for instance. --[[smcv]]
+The directive can also have parameters:
-## Writing the album
+* `title`, `copyright` and `date` are short-cuts for the corresponding
+ [[ikiwiki/directive/meta]] directives
-The album contains one `\[[!album]]` directive. It may also
-contain any number of `\[[!albumsection]]` directives, for
-example the demo album linked above could look like:
+* `caption` sets a caption which is displayed in the album and viewer
+ pages
- \[[!album]]
- <!-- replaced with one uncategorized photo -->
+The viewer page can also have other contents before or after the actual
+image viewer.
+
+## Bugs
+
+* The plugin doesn't do anything special to handle albums that are subpages
+ of each other. If, say, `debconf` and `debconf/monday` are both albums,
+ then `debconf/monday/p100.jpg` will currently be assigned to one or the
+ other, arbitrarily.
+
+* The plugin doesn't do anything special to handle photos with similar names.
+ If you have `p100.jpg` and `p100.png`, one will get a viewer page called
+ `p100` and the other will be ignored.
+
+* If there's no `albumimage` in a viewer page, one should probably be appended
+ automatically.
- ## Gamarra
+## TODO
- \[[!albumsection filter="link(gamarra)"]]
- <!-- all the Gamarra photos -->
+* The documentation should mention how to replicate the appearance of
+ `album` and `albumsection` using an `inline` of viewer pages.
- ## Smokescreen
+* The documentation should mention all the template variables and
+ all the parameters.
- \[[!albumsection filter="link(smokescreen)"]]
- <!-- all the Smokescreen photos -->
+* The generated viewer page should include most or all of the possible
+ parameters to the `albumimage` directive, with empty values, as a
+ template for editing.
- ...
+* The generated viewer page should extract as much metadata as possible from
+ the photo's EXIF tags (creation/modification dates, author, title, caption,
+ copyright). [[smcv]] has a half-written implementation which runs
+ `scanimage` hooks, and has an `exiftool` plugin using [[!cpan Image::ExifTool]]
+ as a reference implementation of that hook.
-The `\[[!album]]` directive is replaced by an
-[[ikiwiki/directive/inline]] which automatically includes every
-page that has an `\[[!albumimage]]` directive linking it to this
-album, except those that will appear in an `\[[!albumsection]]`.
+* There should be an option to reduce the size of photos and write them into
+ an underlay, for this workflow:
-The `inline` is in `archive`/`quick` mode, but includes some
-extra information about the images, including file size and a
-thumbnail (again, made using [[ikiwiki/directive/img]]). The
-default template is `albumitem.tmpl`, which takes advantage
-of these things.
+ * your laptop's local ikiwiki has two underlays, `photos` and `webphotos`
+ * `photos` contains full resolution photos with EXIF tags
+ * for each photo that exists in `photos` but not in `webphotos`, the album
+ plugin automatically resamples it down to a web-compatible resolution
+ ([[smcv]] uses up to 640x640), optimizes it with `jpegoptim`, strips out
+ all EXIF tags, and and writes it into the corresponding location
+ in `webphotos`
+ * `webphotos` is what you rsync to the web server
+ * the web server's ikiwiki only has `webphotos` as an underlay
-Each `\[[!albumsection]]` is replaced by a similar inline, which
-selects a subset of the photos in the album.
+* Eventually, there could be a specialized CGI user interface to batch-edit
+ all the photos of an album (so for each photo, you get an edit box each for
+ title, author, copyright etc.) - this would work by making programmatic
+ edits to all the `albumimage` directives.
diff --git a/doc/plugins/contrib/album/discussion.mdwn b/doc/plugins/contrib/album/discussion.mdwn
index 9720589b4..0356860d8 100644
--- a/doc/plugins/contrib/album/discussion.mdwn
+++ b/doc/plugins/contrib/album/discussion.mdwn
@@ -46,6 +46,10 @@ secondly: barring the CGI interface for editing the album, which would be great,
>
> --[[smcv]]
+>> In the current version of the branch, the viewer pages are
+>> generated automatically if you didn't generate them yourself,
+>> so `ikiwiki-album` is no longer needed. --[[smcv]]
+
i'm new to ikiwiki, apologies if this is dealt with elsewhere. -brush
> This plugin is pretty ambitious, and is unfinished, so I'd recommend
@@ -80,6 +84,10 @@ code or tried it yet, but here goes. --[[Joey]]
>> an image with a strange extension to a differing target filename
>> with the normal extension, respectively). -s
+>>> Now that we have `add_autofile` I can just create viewer pages
+>>> whenever there's an image to view. The current version of the
+>>> branch does that. -s
+
* With each viewer page having next/prev links, I can see how you
were having the scalability issues with ikiwiki's data structures
earlier! -J
@@ -94,6 +102,8 @@ code or tried it yet, but here goes. --[[Joey]]
>> (Unless you use img to make the thumbnails for those links, then it
>> would rebuild the thumbnails anyway. Have not looked at the code.) --[[Joey]]
+>>> I do use img. -s
+
* And doesn't each viewer page really depend on every other page in the
same albumsection? If a new page is added, the next/prev links
may need to be updated, for example. If so, there will be much
@@ -142,13 +152,20 @@ code or tried it yet, but here goes. --[[Joey]]
> one album: if they're subpages of 2+ nested albums then they're only
> considered to be in the deepest-nested one (i.e. longest URL), and if
> they're not in any album then that's a usage error. This would
-> also make prev/next links sane.
->
+> also make prev/next links sane. -s
+
+>> The current version constrains images to be in at most one album,
+>> choosing one arbitrarily (dependent on scan order) if albums are
+>> nested. -s
+
> If you want to reference images from elsewhere in the wiki and display
> them as if in an album, then you can use an ordinary inline with
> the same template that the album would use, and I'll make sure the
-> templates are set up so this works.
->
+> templates are set up so this works. -s
+
+>> Still needs documenting, I've put it on the TODO list on the main
+>> page. -s
+
> (Implementation detail: this means that an image X/Y/Z/W/V, where X and
> Y are albums, Z does not exist and W exists but is not an album,
> would have a content dependency on Y, a presence dependency on Z
@@ -158,6 +175,12 @@ code or tried it yet, but here goes. --[[Joey]]
> subpages of the album, although that would mean breaking some URLs
> on the existing website I'm doing all this work for... -s
+>> The current version of the branch doesn't have this restriction;
+>> perhaps it's a worthwhile simplification, or perhaps it's too
+>> restrictive? I fairly often use directory hierarchies like
+>> `a_festival/saturday/foo.jpg` within an album, which makes
+>> it very easy to write `albumsection` filters. -s
+
* Putting a few of the above thoughts together, my ideal album system
seems to be one where I can just drop the images into a directory and
have them appear in the album index, as well as each generate their own wiki
@@ -195,6 +218,10 @@ code or tried it yet, but here goes. --[[Joey]]
>> upload-and-rename.
>> -s
+>>> I believe the current branch meets your requirements, by having
+>>> first-class wiki pages spring into existence using `add_autofile`
+>>> to be viewer pages for photos. -s
+
> In a way, what you really want for metadata is to have it in the album
> page, so you can batch-edit the whole lot by editing one file (this
> does mean that editing the album necessarily causes each of its viewers
@@ -214,6 +241,9 @@ code or tried it yet, but here goes. --[[Joey]]
>> (That's apparently good enough for Bugzilla, but not really
>> for ikiwiki). -s
+>>> This is now in the main page's TODO list; if/when I implement this,
+>>> I intend to make it a specialized CGI interface. -s
+
>> Yes, [all metadata in one file] would make some sense.. It also allows putting one image in
>> two albums, with different caption etc. (Maybe for different audiences.)
>> --[[Joey]]
@@ -229,7 +259,8 @@ code or tried it yet, but here goes. --[[Joey]]
----
-Trying to use the "special extension" design:
+'''I think the "special extension" design is a dead-end, but here's what
+happened when I tried to work out how it would work. --[[smcv]]'''
Suppose that each viewer is a JPEG-or-GIF-or-something, with extension
".albumimage". We have a gallery "memes" with three images, badger,
diff --git a/doc/plugins/contrib/field.mdwn b/doc/plugins/contrib/field.mdwn
index a43bf24b2..dce2d891c 100644
--- a/doc/plugins/contrib/field.mdwn
+++ b/doc/plugins/contrib/field.mdwn
@@ -13,6 +13,22 @@ IkiWiki::Plugin::field - front-end for per-page record fields.
# simple registration
field_register => [qw{meta}],
+ # simple registration with priority
+ field_register => {
+ meta => 'last'
+ foo => 'DD'
+ },
+
+ # allow the config to be queried as a field
+ field_allow_config => 1,
+
+ # flag certain fields as "tags"
+ field_tags => {
+ BookAuthor => '/books/authors',
+ BookGenre => '/books/genres',
+ MovieGenre => '/movies/genres',
+ }
+
## DESCRIPTION
This plugin is meant to be used in conjunction with other plugins
@@ -22,35 +38,99 @@ are fields in that record. This can include the meta-data for that page,
such as the page title.
Plugins can register a function which will return the value of a "field" for
-a given page. This can be used in three ways:
+a given page. This can be used in a few ways:
* In page templates; all registered fields will be passed to the page template in the "pagetemplate" processing.
* In PageSpecs; the "field" function can be used to match the value of a field in a page.
+* In SortSpecs; the "field" function can be used for sorting pages by the value of a field in a page.
* By other plugins, using the field_get_value function, to get the value of a field for a page, and do with it what they will.
-## OPTIONS
+## CONFIGURATION OPTIONS
The following options can be set in the ikiwiki setup file.
+**field_allow_config**
+
+ field_allow_config => 1,
+
+Allow the $config hash to be queried like any other field; the
+keys of the config hash are the field names.
+
**field_register**
-A list of plugin-IDs to register. This assumes that the plugins in
-question store data in the %pagestatus hash using the ID of that plugin,
-and thus the field values are looked for there.
+ field_register => [qw{meta}],
+
+ field_register => {
+ meta => 'last'
+ foo => 'DD'
+ },
+
+A hash of plugin-IDs to register. The keys of the hash are the names of the
+plugins, and the values of the hash give the order of lookup of the field
+values. The order can be 'first', 'last', 'middle', or an explicit order
+sequence between 'AA' and 'ZZ'. If the simpler type of registration is used,
+then the order will be 'middle'.
+
+This assumes that the plugins in question store data in the %pagestatus hash
+using the ID of that plugin, and thus the field values are looked for there.
This is the simplest form of registration, but the advantage is that it
doesn't require the plugin to be modified in order for it to be
registered with the "field" plugin.
-## PageSpec
+**field_tags**
+
+ field_tags => {
+ BookAuthor => '/books/authors',
+ BookGenre => '/books/genres',
+ MovieGenre => '/movies/genres',
+ }
-The "field" PageSpec function can be used to match the value of a field for a page.
+A hash of fields and their associated pages. This provides a faceted
+tagging system.
-field(*name* *glob*)
+The way this works is that a given field-name will be associated with a given
+page, and the values of that field will be linked to sub-pages of that page.
For example:
-field(bar Foo*) will match if the "bar" field starts with "Foo".
+ BookGenre: SF
+
+will link to "/books/genres/SF", with a link-type of "bookgenre".
+
+## PageSpec
+
+The `field` plugin provides a few PageSpec functions to match values
+of fields for pages.
+
+* field
+ * **field(*name* *glob*)**
+ * field(bar Foo\*) will match if the "bar" field starts with "Foo".
+* destfield
+ * **destfield(*name* *glob*)**
+ * as for "field" but matches against the destination page (i.e when the source page is being included in another page).
+* field_item
+ * **field_item(*name* *glob*)**
+ * field_item(bar Foo) will match if one of the values of the "bar" field is "Foo".
+* destfield_item
+ * **destfield_item(*name* *glob*)**
+ * as for "field_item" but matches against the destination page.
+* field_tagged
+ * **field_tagged(*name* *glob*)**
+ * like `tagged`, but this uses the tag-bases and link-types defined in the `field_tags` configuration option.
+* destfield_tagged
+ * **destfield_tagged(*name* *glob*)**
+ * as for "field_tagged" but matches against the destination page.
+
+## SortSpec
+
+The "field" SortSpec function can be used to sort a page depending on the value of a field for that page. This is used for directives that take sort parameters, such as **inline** or **report**.
+
+field(*name*)
+
+For example:
+
+sort="field(bar)" will sort by the value og the "bar" field.
## FUNCTIONS
@@ -58,16 +138,18 @@ field(bar Foo*) will match if the "bar" field starts with "Foo".
field_register(id=>$id);
-Register a plugin as having field data. The above form is the simplest, where the field value
-is looked up in the %pagestatus hash under the plugin-id.
+Register a plugin as having field data. The above form is the simplest, where
+the field value is looked up in the %pagestatus hash under the plugin-id.
Additional Options:
**call=>&myfunc**
-A reference to a function to call rather than just looking up the value in the %pagestatus hash.
-It takes two arguments: the name of the field, and the name of the page. It is expected to return
-the value of that field, or undef if there is no field by that name.
+A reference to a function to call rather than just looking up the value in the
+%pagestatus hash. It takes two arguments: the name of the field, and the name
+of the page. It is expected to return (a) an array of the values of that field
+if "wantarray" is true, or (b) a concatenation of the values of that field
+if "wantarray" is not true, or (c) undef if there is no field by that name.
sub myfunc ($$) {
my $field = shift;
@@ -75,22 +157,38 @@ the value of that field, or undef if there is no field by that name.
...
- return $value;
+ return (wantarray ? @values : $value);
}
**first=>1**
-Set this to be called first in the sequence of calls looking for values. Since the first found
-value is the one which is returned, ordering is significant.
+Set this to be called first in the sequence of calls looking for values. Since
+the first found value is the one which is returned, ordering is significant.
+This is equivalent to "order=>'first'".
**last=>1**
-Set this to be called last in the sequence of calls looking for values. Since the first found
-value is the one which is returned, ordering is significant.
+Set this to be called last in the sequence of calls looking for values. Since
+the first found value is the one which is returned, ordering is significant.
+This is equivalent to "order=>'last'".
+
+**order=>$order**
+
+Set the explicit ordering in the sequence of calls looking for values. Since
+the first found value is the one which is returned, ordering is significant.
+
+The values allowed for this are "first", "last", "middle", or a two-character
+ordering-sequence between 'AA' and 'ZZ'.
### field_get_value($field, $page)
-Returns the value of the field for that page, or undef if none is found.
+ my @values = field_get_value($field, $page);
+
+ my $value = field_get_value($field, $page);
+
+Returns the values of the field for that page, or undef if none is found.
+Note that it will return an array of values if you ask for an array,
+and a scalar value if you ask for a scalar.
## DOWNLOAD
diff --git a/doc/plugins/contrib/field/discussion.mdwn b/doc/plugins/contrib/field/discussion.mdwn
new file mode 100644
index 000000000..103e061e5
--- /dev/null
+++ b/doc/plugins/contrib/field/discussion.mdwn
@@ -0,0 +1,326 @@
+Having tried out `field`, some comments (from [[smcv]]):
+
+The general concept looks great.
+
+The `pagetemplate` hook seems quite namespace-polluting: on a site containing
+a list of books, I'd like to have an `author` field, but that would collide
+with IkiWiki's use of `<TMPL_VAR AUTHOR>` for the author of the *page*
+(i.e. me). Perhaps it'd be better if the pagetemplate hook was only active for
+`<TMPL_VAR FIELD_AUTHOR>` or something? (For those who want the current
+behaviour, an auxiliary plugin would be easy.)
+
+> No, please. The idea is to be *able* to override field names if one wishes to, and choose, for yourself, non-colliding field names if one wishes not to. I don't wish to lose the power of being able to, say, define a page title with YAML format if I want to, or to write a site-specific plugin which calculates a page title, or other nifty things.
+>It's not like one is going to lose the fields defined by the meta plugin; if "author" is defined by \[[!meta author=...]] then that's what will be found by "field" (provided the "meta" plugin is registered; that's what the "field_register" option is for).
+>--[[KathrynAndersen]]
+
+>> Hmm. I suppose if you put the title (or whatever) in the YAML, then
+>> "almost" all the places in IkiWiki that respect titles will do the
+>> right thing due to the pagetemplate hook, with the exception being
+>> anything that has special side-effects inside `meta` (like `date`),
+>> or anything that looks in `$pagestate{foo}{meta}` directly
+>> (like `map`). Is your plan that `meta` should register itself by
+>> default, and `map` and friends should be adapted to
+>> work based on `getfield()` instead of `$pagestate{foo}{meta}`, then?
+
+>>> Based on `field_get_value()`, yes. That would be my ideal. Do you think I should implement that as an ikiwiki branch? --[[KathrynAndersen]]
+
+>>>> This doesn't solve cases where certain fields are treated specially; for
+>>>> instance, putting a `\[[!meta permalink]]` on a page is not the same as
+>>>> putting it in `ymlfront` (in the latter case you won't get your
+>>>> `<link>` header), and putting `\[[!meta date]]` is not the same as putting
+>>>> `date` in `ymlfront` (in the latter case, `%pagectime` won't be changed).
+>>>>
+>>>> One way to resolve that would be to have `ymlfront`, or similar, be a
+>>>> front-end for `meta` rather than for `field`, and call
+>>>> `IkiWiki::Plugin::meta::preprocess` (or a refactored-out function that's
+>>>> similar).
+>>>>
+>>>> There are also some cross-site scripting issues (see below)... --[[smcv]]
+
+>> (On the site I mentioned, I'm using an unmodified version of `field`,
+>> and currently working around the collision by tagging books' pages
+>> with `bookauthor` instead of `author` in the YAML.) --s
+
+>> Revisiting this after more thought, the problem here is similar to the
+>> possibility that a wiki user adds a `meta` shortcut
+>> to [[shortcuts]], or conversely, that a plugin adds a `cpan` directive
+>> that conflicts with the `cpan` shortcut that pages already use. (In the
+>> case of shortcuts, this is resolved by having plugin-defined directives
+>> always win.) For plugin-defined meta keywords this is the plugin
+>> author's/wiki admin's problem - just don't enable conflicting plugins! -
+>> but it gets scary when you start introducing things like `ymlfront`, which
+>> allow arbitrary, wiki-user-defined fields, even ones that subvert
+>> other plugins' assumptions.
+>>
+>> The `pagetemplate` hook is particularly alarming because page templates are
+>> evaluated in many contexts, not all of which are subject to the
+>> htmlscrubber or escaping; because the output from `field` isn't filtered,
+>> prefixed or delimited, when combined with an arbitrary-key-setting plugin
+>> like `ymlfront` it can interfere with other plugins' expectations
+>> and potentially cause cross-site scripting exploits. For instance, `inline`
+>> has a `pagetemplate` hook which defines the `FEEDLINKS` template variable
+>> to be a blob of HTML to put in the `<head>` of the page. As a result, this
+>> YAML would be bad:
+>>
+>> ---
+>> FEEDLINKS: <script>alert('code injection detected')</script>
+>> ---
+>>
+>> (It might require a different case combination due to implementation
+>> details, I'm not sure.)
+>>
+>> It's difficult for `field` to do anything about this, because it doesn't
+>> know whether a field is meant to be plain text, HTML, a URL, or something
+>> else.
+>>
+>> If `field`'s `pagetemplate` hook did something more limiting - like
+>> only emitting template variables starting with `field_`, or from some
+>> finite set, or something - then this would cease to be a problem, I think?
+>>
+>> `ftemplate` and `getfield` don't have this problem, as far as I can see,
+>> because their output is in contexts where the user could equally well have
+>> written raw HTML directly; the user can cause themselves confusion, but
+>> can't cause harmful output. --[[smcv]]
+
+From a coding style point of view, the `$CamelCase` variable names aren't
+IkiWiki style, and the `match_foo` functions look as though they could benefit
+from being thin wrappers around a common `&IkiWiki::Plugin::field::match`
+function (see `meta` for a similar approach).
+
+I think the documentation would probably be clearer in a less manpage-like
+and more ikiwiki-like style?
+
+> I don't think ikiwiki *has* a "style" for docs, does it? So I followed the Perl Module style. And I'm rather baffled as to why having the docs laid out in clear sections... make them less clear. --[[KathrynAndersen]]
+
+>> I keep getting distracted by the big shouty headings :-)
+>> I suppose what I was really getting at was that when this plugin
+>> is merged, its docs will end up split between its plugin
+>> page, [[plugins/write]] and [[ikiwiki/PageSpec]]; on some of the
+>> contrib plugins I've added I've tried to separate the docs
+>> according to how they'll hopefully be laid out after merge. --s
+
+If one of my branches from [[todo/allow_plugins_to_add_sorting_methods]] is
+accepted, a `field()` cmp type would mean that [[plugins/contrib/report]] can
+stop reimplementing sorting. Here's the implementation I'm using, with
+your "sortspec" concept (a sort-hook would be very similar): if merged,
+I think it should just be part of `field` rather than a separate plugin.
+
+ # Copyright © 2010 Simon McVittie, released under GNU GPL >= 2
+ package IkiWiki::Plugin::fieldsort;
+ use warnings;
+ use strict;
+ use IkiWiki 3.00;
+ use IkiWiki::Plugin::field;
+
+ sub import {
+ hook(type => "getsetup", id => "fieldsort", call => \&getsetup);
+ }
+
+ sub getsetup () {
+ return
+ plugin => {
+ safe => 1,
+ rebuild => undef,
+ },
+ }
+
+ package IkiWiki::SortSpec;
+
+ sub cmp_field {
+ if (!length $_[0]) {
+ error("sort=field requires a parameter");
+ }
+
+ my $left = IkiWiki::Plugin::field::field_get_value($_[0], $a);
+ my $right = IkiWiki::Plugin::field::field_get_value($_[0], $b);
+
+ $left = "" unless defined $left;
+ $right = "" unless defined $right;
+ return $left cmp $right;
+ }
+
+ 1;
+
+----
+
+Disclaimer: I've only looked at this plugin and ymlfront, not other related
+stuff yet. (I quite like ymlfront, so I looked at this as its dependency. :)
+I also don't want to annoy you with a lot of design discussion
+if your main goal was to write a plugin that did exactly what you wanted.
+
+My first question is: Why we need another plugin storing metadata
+about the page, when we already have the meta plugin? Much of the
+complication around the field plugin has to do with it accessing info
+belonging to the meta plugin, and generalizing that to be able to access
+info stored by other plugins too. (But I don't see any other plugins that
+currently store such info). Then too, it raises points of confusion like
+smcv's discuission of field author vs meta author above. --[[Joey]]
+
+> The point is exactly in the generalization, to provide a uniform interface for accessing structured data, no matter what the source of it, whether that be the meta plugin or some other plugin.
+
+> There were a few reasons for this:
+
+>1. In converting my site over from PmWiki, I needed something that was equivalent to PmWiki's Page-Text-Variables (which is how PmWiki implements structured data).
+>2. I also wanted an equivalent of PmWiki's Page-Variables, which, rather than being simple variables, are the return-value of a function. This gives one a lot of power, because one can do calculations, derive one thing from another. Heck, just being able to have a "basename" variable is useful.
+>3. I noticed that in the discussion about structured data, it was mired down in disagreements about what form the structured data should take; I wanted to overcome that hurdle by decoupling the form from the content.
+>4. I actually use this to solve (1), because, while I do use ymlfront, initially my pages were in PmWiki format (I wrote (another) unreleased plugin which parses PmWiki format) including PmWiki's Page-Text-Variables for structured data. So I needed something that could deal with multiple formats.
+
+> So, yes, it does cater to mostly my personal needs, but I think it is more generally useful, also.
+> --[[KathrynAndersen]]
+
+>> Is it fair to say, then, that `field`'s purpose is to take other
+>> plugins' arbitrary per-page data, and present it as a single
+>> merged/flattened string => string map per page? From the plugins
+>> here, things you then use that merged map for include:
+>>
+>> * sorting - stolen by [[todo/allow_plugins_to_add_sorting_methods]]
+>> * substitution into pages with Perl-like syntax - `getfield`
+>> * substitution into wiki-defined templates - the `pagetemplate`
+>> hook
+>> * substitution into user-defined templates - `ftemplate`
+>>
+>> As I mentioned above, the flattening can cause collisions (and in the
+>> `pagetemplate` case, even security problems).
+>>
+>> I wonder whether conflating Page Text Variables with Page Variables
+>> causes `field` to be more general than it needs to be?
+>> To define a Page Variable (function-like field), you need to write
+>> a plugin containing that Perl function; if we assume that `field`
+>> or something resembling it gets merged into ikiwiki, then it's
+>> reasonable to expect third-party plugins to integrate with whatever
+>> scaffolding there is for these (either in an enabled-by-default
+>> plugin that most people are expected to leave enabled, like `meta`
+>> now, or in the core), and it doesn't seem onerous to expect each
+>> plugin that wants to participate in this mechanism to have code to
+>> do so. While it's still contrib, `field` could just have a special case
+>> for the meta plugin, rather than the converse?
+>>
+>> If Page Text Variables are limited to being simple strings as you
+>> suggest over in [[forum/an_alternative_approach_to_structured_data]],
+>> then they're functionally similar to `meta` fields, so one way to
+>> get their functionality would be to extend `meta` so that
+>>
+>> \[[!meta badger="mushroom"]]
+>>
+>> (for an unrecognised keyword `badger`) would store
+>> `$pagestate{$page}{meta}{badger} = "mushroom"`? Getting this to
+>> appear in templates might be problematic, because a naive
+>> `pagetemplate` hook would have the same problem that `field` combined
+>> with `ymlfront` currently does.
+>>
+>> One disadvantage that would appear if the function-like and
+>> meta-like fields weren't in the same namespace would be that it
+>> wouldn't be possible to switch a field from being meta-like to being
+>> function-like without changing any wiki content that referenced it.
+>>
+>> Perhaps meta-like fields should just *be* `meta` (with the above
+>> enhancement), as a trivial case of function-like fields? That would
+>> turn `ymlfront` into an alternative syntax for `meta`, I think?
+>> That, in turn, would hopefully solve the special-fields problem,
+>> by just delegating it to meta. I've been glad of the ability to define
+>> new ad-hoc fields with this plugin without having to write an extra plugin
+>> to do so (listing books with a `bookauthor` and sorting them by
+>> `"field(bookauthor) title"`), but that'd be just as easy if `meta`
+>> accepted ad-hoc fields?
+>>
+>> --[[smcv]]
+
+>>> Your point above about cross-site scripting is a valid one, and something I
+>>> hadn't thought of (oops).
+
+>>> I still want to be able to populate pagetemplate templates with field, because I
+>>> use it for a number of things, such as setting which CSS files to use for a
+>>> given page, and, as I said, for titles. But apart from the titles, I
+>>> realize I've been setting them in places other than the page data itself.
+>>> (Another unreleased plugin, `concon`, uses Config::Context to be able to
+>>> set variables on a per-site, per-directory and a per-page basis).
+
+>>> The first possible solution is what you suggested above: for field to only
+>>> set values in pagetemplate which are prefixed with *field_*. I don't think
+>>> this is quite satisfactory, since that would still mean that people could
+>>> put un-scrubbed values into a pagetemplate, albeit they would be values
+>>> named field_foo, etc. --[[KathrynAndersen]]
+
+>>>> They can already do similar; `PERMALINK` is pre-sanitized to
+>>>> ensure that it's a "safe" URL, but if an extremely confused wiki admin was
+>>>> to put `COPYRIGHT` in their RSS/Atom feed's `<link>`, a malicious user
+>>>> could put an unsafe (e.g. Javascript) URL in there (`COPYRIGHT` *is*
+>>>> HTML-scrubbed, but "javascript:alert('pwned!')" is just text as far as a
+>>>> HTML sanitizer is concerned, so it passes straight through). The solution
+>>>> is to not use variables in situations where that variable would be
+>>>> inappropriate. Because `field` is so generic, the definition of what's
+>>>> appropriate is difficult. --[[smcv]]
+
+>>> An alternative solution would be to classify field registration as "secure"
+>>> and "insecure". Sources such as ymlfront would be insecure, sources such
+>>> as concon (or the $config hash) would be secure, since they can't be edited
+>>> as pages. Then, when doing pagetemplate substitution (but not ftemplate
+>>> substitution) the insecure sources could be HTML-escaped.
+>>> --[[KathrynAndersen]]
+
+>>>> Whether you trust the supplier of data seems orthogonal to whether its value
+>>>> is (meant to be) interpreted as plain text, HTML, a URL or what?
+>>>>
+>>>> Even in cases where you trust the supplier, you need to escape things
+>>>> suitably for the context, not for security but for correctness. The
+>>>> definition of the value, and the context it's being used in, changes the
+>>>> processing you need to do. An incomplete list:
+>>>>
+>>>> * HTML used as HTML needs to be html-scrubbed if and only if untrusted
+>>>> * URLs used as URLs need to be put through `safeurl()` if and only if
+>>>> untrusted
+>>>> * HTML used as plain text needs tags removed regardless
+>>>> * URLs used as plain text are safe
+>>>> * URLs or plain text used in HTML need HTML-escaping (and URLs also need
+>>>> `safeurl()` if untrusted)
+>>>> * HTML or plain text used in URLs need URL-escaping (and the resulting
+>>>> URL might need sanitizing too?)
+>>>>
+>>>> I can't immediately think of other data types we'd be interested in beyond
+>>>> text, HTML and URL, but I'm sure there are plenty.
+
+>>>>> But isn't this a problem with anything that uses pagetemplates? Or is
+>>>>> the point that, with plugins other than `field`, they all know,
+>>>>> beforehand, the names of all the fields that they are dealing with, and
+>>>>> thus the writer of the plugin knows which treatment each particular field
+>>>>> needs? For example, that `meta` knows that `title` needs to be
+>>>>> HTML-escaped, and that `baseurl` doesn't. In that case, yes, I see the problem.
+>>>>> It's a tricky one. It isn't as if there's only ever going to be a fixed set of fields that need different treatment, either. Because the site admin is free to add whatever fields they like to the page template (if they aren't using the default one, that is. I'm not using the default one myself).
+>>>>> Mind you, for trusted sources, since the person writing the page template and the person providing the variable are the same, they themselves would know whether the value will be treated as HTML, plain text, or a URL, and thus could do the needed escaping themselves when writing down the value.
+
+>>>>> Looking at the content of the default `page.tmpl` let's see what variables fall into which categories:
+
+>>>>> * **Used as URL:** BASEURL, EDITURL, PARENTLINKS->URL, RECENTCHANGESURL, HISTORYURL, GETSOURCEURL, PREFSURL, OTHERLANGUAGES->URL, ADDCOMMENTURL, BACKLINKS->URL, MORE_BACKLINKS->URL
+>>>>> * **Used as part of a URL:** FAVICON, LOCAL_CSS
+>>>>> * **Needs to be HTML-escaped:** TITLE
+>>>>> * **Used as-is (as HTML):** FEEDLINKS, RELVCS, META, PERCENTTRANSLATED, SEARCHFORM, COMMENTSLINK, DISCUSSIONLINK, OTHERLANGUAGES->PERCENT, SIDEBAR, CONTENT, COMMENTS, TAGS->LINK, COPYRIGHT, LICENSE, MTIME, EXTRAFOOTER
+
+>>>>> This looks as if only TITLE needs HTML-escaping all the time, and that the URLS all end with "URL" in their name. Unfortunately the FAVICON and LOCAL_CSS which are part of URLS don't have "URL" in their name, though that's fair enough, since they aren't full URLs.
+
+>>>>> --K.A.
+
+>>>> One reasonable option would be to declare that `field` takes text-valued
+>>>> fields, in which case either consumers need to escape
+>>>> it with `<TMPL_VAR FIELD_FOO ESCAPE=HTML>`, and not interpret it as a URL
+>>>> without first checking `safeurl`), or the pagetemplate hook needs to
+>>>> pre-escape.
+
+>>>>> Since HTML::Template does have the ability to do ESCAPE=HTML/URL/JS, why not take advantage of that? Some things, like TITLE, probably should have ESCAPE=HTML all the time; that would solve the "to escape or not to escape" problem that `meta` has with titles. After all, when one *sorts* by title, one doesn't really want HTML-escaping in it; only when one uses it in a template. -- K.A.
+
+>>>> Another reasonable option would be to declare that `field` takes raw HTML,
+>>>> in which case consumers need to only use it in contexts that will be
+>>>> HTML-scrubbed (but it becomes unsuitable for using as text - problematic
+>>>> for text-based things like sorting or URLs, and not ideal for searching).
+>>>>
+>>>> You could even let each consumer choose how it's going to use the field,
+>>>> by having the `foo` field generate `TEXT_FOO` and `HTML_FOO` variables?
+>>>> --[[smcv]]
+
+>>>>> Something similar is already done in `template` and `ftemplate` with the `raw_` prefix, which determines whether the variable should have `htmlize` run over it first before the value is applied to the template. Of course, that isn't scrubbing or escaping, because with those templates, the scrubbing is done afterwards as part of the normal processing.
+
+>>> Another problem, as you point out, is special-case fields, such as a number of
+>>> those defined by `meta`, which have side-effects associated with them, more
+>>> than just providing a value to pagetemplate. Perhaps `meta` should deal with
+>>> the side-effects, but use `field` as an interface to get the values of those special fields.
+
+>>> --[[KathrynAndersen]]
diff --git a/doc/plugins/contrib/flattr.mdwn b/doc/plugins/contrib/flattr.mdwn
new file mode 100644
index 000000000..f8f005c31
--- /dev/null
+++ b/doc/plugins/contrib/flattr.mdwn
@@ -0,0 +1,45 @@
+[[!template id=plugin name=flattr author="[[jaywalk]]"]]
+
+[flattr.com](http://flattr.com/) is a flatrate micropayment service, which revolves around the idea of having flattr buttons everywhere that people visiting your site can use to "flattr" you.
+
+This plugin makes it easier to put flattr buttons in ikiwiki. It supports both the static kind as well as the counting dynamic javascript version. The dynamic version does not work if [[htmlscrubber|/plugins/htmlscrubber]] is active on the page.
+
+The dynamic button does not require creation of the page on flattr before being added to a page, the static one does.
+
+I wrote some notes on [jonatan.walck.se](http://jonatan.walck.se/software/ikiwiki/plugin/flattr/) and put the source here: [flattr.pm](http://jonatan.walck.se/software/ikiwiki/flattr.pm)
+
+This plugin is licensed under [CC0](http://creativecommons.org/publicdomain/zero/1.0/) (public domain).
+
+# Usage #
+
+ # [[!flattr args]] where args are in the form of arg=value.
+ # Possible args:
+ # type - static or dynamic. Defaults to static.
+
+ # vars in static mode:
+ # --------------------
+ # Required:
+ # url - URL to flattr page,
+ # e.g. http://flattr.com/thing/1994/jaywalks-weblog
+ # Optional:
+ # style - Set to compact for compact button.
+
+ # vars in dynamic mode:
+ # ---------------------
+ # Required:
+ # None.
+ # Optional:
+ # uid - Set the default in the plugin, override if needed.
+ # title - The title defaults to $wikiname/some/path (like on the top of
+ # the wiki).
+ # desc - A description of the content. Defaults to " ".
+ # cat - Category, this can be text, images, video, audio, software or
+ # rest. Defaults to text.
+ # lang - Language, list of available choises is on
+ # https://flattr.com/support/integrate/languages. Defaults to en_GB.
+ # tag - A list of comma separated tags. Empty per default.
+ # url - URL to thing to flattred,
+ # e.g. http://jonatan.walck.se/weblog
+ # style - Set it to compact to get the small button, big for any other
+ # value including empty.
+
diff --git a/doc/plugins/contrib/flattr/discussion.mdwn b/doc/plugins/contrib/flattr/discussion.mdwn
new file mode 100644
index 000000000..586139e9c
--- /dev/null
+++ b/doc/plugins/contrib/flattr/discussion.mdwn
@@ -0,0 +1,9 @@
+FWIW, it is possible for a plugin like this to add javascript to pages that
+are protected by htmlscrubber. Just return a token in your preprocess hook,
+and then have a format hook that replaces the token with the javascript.
+--[[Joey]]
+
+> Thanks, That's good to know. I'll try to continue the development of this
+> plugin later, for now I just needed it to work. :) It will most likely
+> evolve as my page does too.
+> --[[jaywalk]]
diff --git a/doc/plugins/contrib/ftemplate.mdwn b/doc/plugins/contrib/ftemplate.mdwn
new file mode 100644
index 000000000..d82867f94
--- /dev/null
+++ b/doc/plugins/contrib/ftemplate.mdwn
@@ -0,0 +1,25 @@
+[[!template id=plugin name=ftemplate author="[[rubykat]]"]]
+[[!tag type/meta type/format]]
+
+This plugin provides the [[ikiwiki/directive/ftemplate]] directive.
+
+This is like the [[ikiwiki/directive/template]] directive, with the addition
+that one does not have to provide all the values in the call to the template,
+because ftemplate can query structured data ("fields") using the [[field]]
+plugin.
+
+## Activate the plugin
+
+ add_plugins => [qw{goodstuff ftemplate ....}],
+
+## PREREQUISITES
+
+ IkiWiki
+ IkiWiki::Plugin::field
+ HTML::Template
+ Encode
+
+## DOWNLOAD
+
+* browse at GitHub: <http://github.com/rubykat/ikiplugins/blob/master/IkiWiki/Plugin/ftemplate.pm>
+* git repo at git://github.com/rubykat/ikiplugins.git
diff --git a/doc/plugins/contrib/ftemplate/discussion.mdwn b/doc/plugins/contrib/ftemplate/discussion.mdwn
new file mode 100644
index 000000000..1e0bca5d8
--- /dev/null
+++ b/doc/plugins/contrib/ftemplate/discussion.mdwn
@@ -0,0 +1,33 @@
+I initially thought this wasn't actually necessary - the combination
+of [[plugins/template]] with [[plugins/contrib/field]]'s `pagetemplate`
+hook ought to provide the same functionality. However, `template`
+doesn't run `pagetemplate` hooks; a more general version of this
+plugin would be to have a variant of `template` that runs `pagetemplate`
+hooks (probably easiest to just patch `template` to implement a
+second directive, or have a special parameter `run_hooks="yes"`,
+or something).
+
+> I got the impression that `pagetemplate` hooks are intended to be completely independent of `template` variables; page-template is for the actual `page.tmpl` template, while `template` is for other templates which are used inside the page content. So I don't understand why one would need a run_hooks option. --[[KathrynAndersen]]
+
+>> `Render`, `inline`, `comments` and `recentchanges` run `pagetemplate`
+>> hooks, as does anything that uses `IkiWiki::misctemplate`. From that
+>> quick survey, it seems as though `template` is the only thing that
+>> uses `HTML::Template` but *doesn't* run `pagetemplate` hooks?
+>>
+>> It just seems strange to me that `field` needs to have its own
+>> variant of `template` (this), its own variant of `inline` (`report`),
+>> and so on - I'd tend to lean more towards having `field`
+>> enhance the existing plugins. I'm not an ikiwiki committer,
+>> mind... Joey, your opinion would be appreciated! --[[smcv]]
+
+>>> I did it that way basically because I needed the functionality ASAP, and I didn't want to step on anyone's toes, so I made them as separate plugins. If Joey wants to integrate the functionality into IkiWiki proper, I would be very happy, but I don't want to put pressure on him. --[[KathrynAndersen]]
+
+Another missing thing is that `ftemplate` looks in
+the "system" templates directories, not just in the wiki, but that
+seems orthogonal (and might be a good enhancement to `template` anyway).
+--[[smcv]]
+
+> Yes, I added that because I wanted the option of not having to make all my templates work as wiki pages also. --[[KathrynAndersen]]
+
+>> Joey has added support for
+>> [[todo/user-defined_templates_outside_the_wiki]] now. --s
diff --git a/doc/plugins/contrib/ftemplate/ikiwiki/directive/ftemplate.mdwn b/doc/plugins/contrib/ftemplate/ikiwiki/directive/ftemplate.mdwn
new file mode 100644
index 000000000..3009fc830
--- /dev/null
+++ b/doc/plugins/contrib/ftemplate/ikiwiki/directive/ftemplate.mdwn
@@ -0,0 +1,106 @@
+The `ftemplate` directive is supplied by the [[!iki plugins/contrib/ftemplate desc=ftemplate]] plugin.
+
+This is like the [[ikiwiki/directive/template]] directive, with the addition
+that one does not have to provide all the values in the call to the template,
+because ftemplate can query structured data ("fields") using the
+[[plugins/contrib/field]] plugin.
+
+Templates are files that can be filled out and inserted into pages in
+the wiki, by using the ftemplate directive. The directive has an id
+parameter that identifies the template to use.
+
+Additional parameters can be used to fill out the template, in
+addition to the "field" values. Passed-in values override the
+"field" values.
+
+There are two places where template files can live. One is in the /templates
+directory on the wiki. These templates are wiki pages, and can be edited from
+the web like other wiki pages.
+
+The second place where template files can live is in the global
+templates directory (the same place where the page.tmpl template lives).
+This is a useful place to put template files if you want to prevent
+them being edited from the web, and you don't want to have to make
+them work as wiki pages.
+
+### EXAMPLES
+
+#### Example 1
+
+PageA:
+
+ \[[!meta title="I Am Page A"]]
+ \[[!meta description="A is for Apple."]]
+ \[[!meta author="Fred Nurk"]]
+ \[[!ftemplate id="mytemplate"]]
+
+Template "mytemplate":
+
+ # <TMPL_VAR NAME="TITLE">
+ by <TMPL_VAR NAME="AUTHOR">
+
+ **Summary:** <TMPL_VAR NAME="DESCRIPTION">
+
+This will give:
+
+ <h1>I Am Page A</h1>
+ <p>by Fred Nurk</p>
+ <p><strong>Summary:</strong> A is for Apple.
+
+#### Example 2: Overriding values
+
+PageB:
+
+ \[[!meta title="I Am Page B"]]
+ \[[!meta description="B is for Banana."]]
+ \[[!meta author="Fred Nurk"]]
+ \[[!ftemplate id="mytemplate" title="Bananananananas"]]
+
+This will give:
+
+ <h1>Bananananananas</h1>
+ <p>by Fred Nurk</p>
+ <p><strong>Summary:</strong> B is for Banana.
+
+#### Example 3: Loops
+
+(this example uses the [[plugins/contrib/ymlfront]] plugin)
+
+Page C:
+
+ ---
+ BookAuthor: Georgette Heyer
+ BookTitle: Black Sheep
+ BookGenre:
+ - Historical
+ - Romance
+ ---
+ \[[ftemplate id="footemplate"]]
+
+ I like this book.
+
+Template "footemplate":
+
+ # <TMPL_VAR BOOKTITLE>
+ by <TMPL_VAR BOOKAUTHOR>
+
+ <TMPL_IF BOOKGENRE>(
+ <TMPL_LOOP GENRE_LOOP><TMPL_VAR BOOKGENRE>
+ <TMPL_UNLESS __last__>, </TMPL_UNLESS>
+ </TMPL_LOOP>
+ )</TMPL_IF>
+
+This will give:
+
+ <h1>Black Sheep</h1>
+ <p>by Georgette Heyer</p>
+
+ <p>(Historical, Romance)</p>
+
+ <p>I like this book.</p>
+
+### LIMITATIONS
+
+One cannot query the values of fields on pages other than the current
+page. If you want to do that, check out the [[plugins/contrib/report]]
+plugin.
diff --git a/doc/plugins/contrib/getfield.mdwn b/doc/plugins/contrib/getfield.mdwn
new file mode 100644
index 000000000..0a92894f1
--- /dev/null
+++ b/doc/plugins/contrib/getfield.mdwn
@@ -0,0 +1,131 @@
+[[!template id=plugin name=getfield author="[[rubykat]]"]]
+[[!tag type/meta type/format]]
+[[!toc]]
+## NAME
+
+IkiWiki::Plugin::getfield - query the values of fields
+
+## SYNOPSIS
+
+ # activate the plugin
+ add_plugins => [qw{goodstuff getfield ....}],
+
+## DESCRIPTION
+
+This plugin provides a way of querying the meta-data (data fields) of a page
+inside the page content (rather than inside a template) This provides a way to
+use per-page structured data, where each page is treated like a record, and the
+structured data are fields in that record. This can include the meta-data for
+that page, such as the page title.
+
+This plugin is meant to be used in conjunction with the [[field]] plugin.
+
+### USAGE
+
+One can get the value of a field by using special markup in the page.
+This does not use directive markup, in order to make it easier to
+use the markup inside other directives. There are four forms:
+
+* {{$*fieldname*}}
+
+ This queries the value of *fieldname* for the source page.
+
+ For example:
+
+ \[[!meta title="My Long and Complicated Title With Potential For Spelling Mistakes"]]
+ # {{$title}}
+
+ When the page is processed, this will give you:
+
+ <h1>My Long and Complicated Title With Potential For Spelling Mistakes</h1>
+
+* {{$*pagename*#*fieldname*}}
+
+ This queries the value of *fieldname* for the page *pagename*.
+
+ For example:
+
+ On PageFoo:
+
+ \[[!meta title="I Am Page Foo"]]
+
+ Stuff about Foo.
+
+ On PageBar:
+
+ For more info, see \[[{{$PageFoo#title}}|PageFoo]].
+
+ When PageBar is displayed:
+
+ &lt;p&gt;For more info, see &lt;a href="PageFoo"&gt;I Am Page Foo&lt;/a&gt;.&lt;/p&gt;
+
+* {{+$*fieldname*+}}
+
+ This queries the value of *fieldname* for the destination page; that is,
+ the value when this page is included inside another page.
+
+ For example:
+
+ On PageA:
+
+ \[[!meta title="I Am Page A"]]
+ # {{+$title+}}
+
+ Stuff about A.
+
+ On PageB:
+
+ \[[!meta title="I Am Page B"]]
+ \[[!inline pagespec="PageA"]]
+
+ When PageA is displayed:
+
+ <h1>I Am Page A</h1>
+ <p>Stuff about A.</p>
+
+ When PageB is displayed:
+
+ <h1>I Am Page B</h1>
+ <p>Stuff about A.</p>
+
+* {{+$*pagename*#*fieldname*+}}
+
+ This queries the value of *fieldname* for the page *pagename*; the
+ only difference between this and {{$*pagename*#*fieldname*}} is
+ that the full name of *pagename* is calculated relative to the
+ destination page rather than the source page.
+
+ I can't really think of a reason why this should be needed, but
+ this format has been added for completeness.
+
+### No Value Found
+
+If no value is found for the given field, then the field name is returned.
+
+For example:
+
+On PageFoo:
+
+ \[[!meta title="Foo"]]
+ My title is {{$title}}.
+
+ My description is {{$description}}.
+
+When PageFoo is displayed:
+
+ <p>My title is Foo.</p>
+
+ <p>My description is description.</p>
+
+This is because "description" hasn't been defined for that page.
+
+### More Examples
+
+Listing all the sub-pages of the current page:
+
+ \[[!map pages="{{$page}}/*"]]
+
+## DOWNLOAD
+
+* browse at GitHub: <http://github.com/rubykat/ikiplugins/blob/master/IkiWiki/Plugin/getfield.pm>
+* git repo at git://github.com/rubykat/ikiplugins.git
diff --git a/doc/plugins/contrib/getfield/discussion.mdwn b/doc/plugins/contrib/getfield/discussion.mdwn
new file mode 100644
index 000000000..5f7fffead
--- /dev/null
+++ b/doc/plugins/contrib/getfield/discussion.mdwn
@@ -0,0 +1,32 @@
+## Templating, and other uses
+
+Like you mentioned in [[ftemplate]] IIRC, it'll only work on the same page. If it can be made to work anywhere, or from a specific place in the wiki - configurable, possibly - you'll have something very similar to mediawiki's templates. I can already think of a few uses for this combined with [[template]] ;) . --[[SR|users/simonraven]]
+
+> Yes, I mentioned "only current page" in the "LIMITATIONS" section.
+
+> What do you think would be a good syntax for querying other pages?
+> It needs to resolve to a single page, though I guess using "bestlink" to find the closest page would mean that one didn't have to spell out the whole page.
+
+>> I don't know the internals very well, I think that's how other plugins do it. *goes to check* Usually it's a `foreach` loop, and use a `pagestate{foo}` to check the page's status/state. There's also some stuff like 'pagespec_match_list($params{page}` ... they do slightly different thing depending on need. --[[SR|users/simonraven]]
+
+>>> No, I meant what markup I should use; the actual implementation probably wouldn't be too difficult.
+
+>>> The current markup is {{$*fieldname*}}; what you're wanting, perhaps it should be represented like {{$*pagename*:*fieldname*}}, or {{$*pagename*::*fieldname*}} or something else...
+>>> -- [[KathrynAndersen]]
+
+>>>> Oh. Hmm. I like your idea actually, or alternately, in keeping more with other plugins, doing it like {{pagename/fieldname}}. The meaning of the separator is less clear with /, but avoids potential issues with filename clashes that have a colon in them. It also keeps a certain logic - at least to me. Either way, I think both are good choices. [[SR|users/simonraven]]
+
+>>>>> What about using {{pagename#fieldname}}? The meaning of the hash in URLs sort of fits with what is needed here (reference to a 'named' thing within the page) and it won't conflict with actual hash usages (unless we expect different named parts of pages to define different values for the same field ...)
+>>>>> -- [[Oblomov]]
+>>>>>> That's a good one too. --[[simonraven]]
+>>>>>>> Done! I used {{$*pagename*#*fieldname*}} for the format. -- [[users/KathrynAndersen]]
+
+
+> I'm also working on a "report" plugin, which will basically apply a template like [[ftemplate]] does, but to a list of pages given from a pagespec, rather than the current page.
+
+> -- [[users/KathrynAndersen]]
+
+>> Ooh, sounds nice :) . --[[SR|users/simonraven]]
+
+>>> I've now released the [[plugins/contrib/report]] plugin. I've been using it on my site; the holdup on releasing was because I hadn't yet written the docs for it. I hope you find it useful.
+>>> -- [[users/KathrynAndersen]]
diff --git a/doc/plugins/contrib/highlightcode.mdwn b/doc/plugins/contrib/highlightcode.mdwn
index 8abb76583..f1df204bb 100644
--- a/doc/plugins/contrib/highlightcode.mdwn
+++ b/doc/plugins/contrib/highlightcode.mdwn
@@ -1,6 +1,8 @@
[[!template id=plugin name=highlightcode author="[[sabr]]"]]
[[!tag type/format]]
+(An alternative to this plugin, [[plugins/highlight]], is now provided with IkiWiki. --[[smcv]])
+
A small plugin to allow Ikiwiki to display source files complete with syntax highlighting. Files with recognized extensions (i.e. my-file.cpp) are be rendered just like any other Ikiwiki page. You can even edit your source files with Ikiwiki's editor.
It uses the Syntax::Highlight::Engine::Kate Perl module to do the highlighting.
diff --git a/doc/plugins/contrib/pod/discussion.mdwn b/doc/plugins/contrib/pod/discussion.mdwn
new file mode 100644
index 000000000..9187b1350
--- /dev/null
+++ b/doc/plugins/contrib/pod/discussion.mdwn
@@ -0,0 +1,14 @@
+My one concern about this plugin is the `=for` markup in POD.
+
+> Some format names that formatters currently are known to
+> accept include "roff", "man", "latex", "tex", "text", and "html".
+
+I don't know which of these [[!cpan Pod::Xhtml]] supports. If it currently
+supports, or later support latex, that could be problimatic since that
+could maybe be used to include files or run code. --[[Joey]]
+
+> I don't know, either; the documentation for [[!cpan Pod:Xhtml]] is silent on this subject. --[[KathrynAndersen]]
+
+>> I'm afraid the only approach is to audit the existing code in the perl
+>> module(s), and then hope nothing is added to them later that opens a
+>> security hole. --[[Joey]]
diff --git a/doc/plugins/contrib/postal.mdwn b/doc/plugins/contrib/postal.mdwn
index b2f875393..c522f8bcb 100644
--- a/doc/plugins/contrib/postal.mdwn
+++ b/doc/plugins/contrib/postal.mdwn
@@ -1,5 +1,5 @@
[[!template id=plugin name=postal author="[[DavidBremner]]"]]
-[[!tag type/useful]]
+[[!tag type/special-purpose]]
The `postal` plugin allows users to send mail to
a special address to comment on a page. It uses the [[mailbox]]
diff --git a/doc/plugins/contrib/report.mdwn b/doc/plugins/contrib/report.mdwn
new file mode 100644
index 000000000..0bd5392c6
--- /dev/null
+++ b/doc/plugins/contrib/report.mdwn
@@ -0,0 +1,26 @@
+[[!template id=plugin name=report author="[[rubykat]]"]]
+[[!tag type/meta type/format]]
+IkiWiki::Plugin::report - Produce templated reports from page field data.
+
+This plugin provides the [[ikiwiki/directive/report]] directive. This enables
+one to report on the structured data ("field" values) of multiple pages; the
+output is formatted via a template. This depends on the
+[[plugins/contrib/field]] plugin.
+
+
+## Activate the plugin
+
+ # activate the plugin
+ add_plugins => [qw{goodstuff report ....}],
+
+## PREREQUISITES
+
+ IkiWiki
+ IkiWiki::Plugin::field
+ HTML::Template
+ Encode
+
+## DOWNLOAD
+
+* browse at GitHub: <http://github.com/rubykat/ikiplugins/blob/master/IkiWiki/Plugin/report.pm>
+* git repo at git://github.com/rubykat/ikiplugins.git
diff --git a/doc/plugins/contrib/report/discussion.mdwn b/doc/plugins/contrib/report/discussion.mdwn
new file mode 100644
index 000000000..e23a4ced4
--- /dev/null
+++ b/doc/plugins/contrib/report/discussion.mdwn
@@ -0,0 +1,75 @@
+Wow, this plugin does a lot... it seems to be `inline` (but without the feeds
+or the ability to not have `archive="yes"`), plus part of
+[[plugins/contrib/trail]], plus some sorting, plus an ingenious workaround
+for template evaluation being relatively stateless.
+
+A large part of this plugin would just fall off if one of the versions of
+"[[todo/allow_plugins_to_add_sorting_methods]]" was merged, which was a
+large part of the idea of that feature request :-) To make use of that
+you'd have to use `pagespec_match_list` in the trail case too, but that's
+easy enough - just add `list => [@the_trail_pages]` to the arguments.
+
+Another large part would fall off if this plugin required, and internally
+invoked, `inline` (like my `comments` plugin does) - `inline` runs
+`pagetemplate` hooks, and in particular, it'll run the `field` hook.
+Alternatively, this plugin could invoke `pagetemplate` hooks itself,
+removing the special case for `field`.
+
+Perhaps the `headers` thing could migrate into inline somehow? That might
+lead to making inline too big, though.
+
+> I think inline is *already* too big, honestly. --[[KathrynAndersen]]
+
+>> A fair point; perhaps my complaint should be that *inline* does
+>> too many orthogonal things. I suppose the headers feature wouldn't
+>> really make sense in an inline that didn't have `archive="yes"`,
+>> so it'd make sense to recommend this plugin as a replacement
+>> for inlining with archive=yes (for which I now realise "inline"
+>> is the wrong verb anyway :-) ) --s
+
+>>> I think *inline* would be a bit less unwieldy if there was some way of factoring out the feed stuff into a separate plugin, but I don't know if that's possible. --K.A.
+
+Is the intention that the `trail` part is a performance hack, or a way
+to select pages? How does it relate to [[todo/wikitrails]] or
+[[plugins/contrib/trail]]? --[[smcv]]
+
+> The `trail` part is *both* a performance hack, and a way to select pages. I have over 5000 pages on my site, I need all the performance hacks I can get.
+> For the performance hack, it is a way of reducing the need to iterate through every single page in the wiki in order to find matching pages.
+> For the way-to-select-pages, yes, it is intended to be similar to [[todo/wikitrails]] and [[plugins/contrib/trail]] (and will be more similar with the new release which will be happening soon; it will add prev_* and next_* variables).
+> The idea is that, rather than having to add special "trail" links on PageA to indicate that a page is part of the trail,
+> it takes advantage of the `%links` hash, which already contains, for each page, an array of the links from that page to other pages. No need for special markup, just use what's there; a trail is defined as "all the pages linked to from page X", and since it's an array, it has an order already.
+> But to avoid that being too limiting, one can use a `pages=...` pagespec to filter that list to a subset; only the pages one is interested in.
+> And one can also sort it, if one so desires.
+> --[[KathrynAndersen]]
+
+>> That's an interesting approach to trails; I'd missed the fact that
+>> links are already ordered.
+>>
+>> This does have the same problems as tags, though: see
+>> [[bugs/tagged()_matching_wikilinks]] and
+>> [[todo/matching_different_kinds_of_links]]. I suppose the question
+>> now is whether new code should be consistent with `tag` (and
+>> potentially be fixed at the same time as tag itself), or try to
+>> avoid those problems?
+>>
+>> The combination of `trail` with another pagespec in this plugin
+>> does provide a neat way for it to work around having unwanted
+>> pages in the report, by limiting by a suitable tag or subdirectory
+>> or something. --s
+
+>>> Either that, or somehow combine tagging with fields, such that one could declare a tag, and it would create both a link and a field with a given value. (I've been working on something like that, but it still has bugs).
+>>> That way, the test for whether something is tagged would be something like "link(tag/foo) and field(tag foo)".
+>>> --K.A.
+
+>>>> I can see that this'd work well for 1:1 relationships like next
+>>>> and previous, but I don't think that'd work for pages with more than
+>>>> one tag - as far as I can see, `field`'s data model is that each
+>>>> page has no more than one value for each field?
+>>>> [[todo/Matching_different_kinds_of_links]] has some thoughts about
+>>>> how it could be implemented, though. --s
+
+>>>>> You have a point there. I'm not sure what would be better: to add the concept of arrays/sets to `field`, or to think of tags as a special case. Problem is, I find tags as they currently exist to be too limiting. I prefer something that can be used for Faceted Tagging <http://en.wikipedia.org/wiki/Faceted_classification>; that is, things like Author:Fred Nurk, Genre:Historical, Rating:Good, and so on. Of course, that doesn't mean that each tag is limited to only one value, either; just to take the above examples, something might have more than one author, or have multiple genres (such as Historical + Romance).
+
+>>>>> It might be that adding arrays to the `field` plugin is a good way to go: after all, even though field=value is the most common, with the flexibility of things like YAML, one could define all sorts of things. What I'm not so sure about is how to return the values when queried, since some things would be expecting scalars all the time. Ah, perhaps I could use wantarray?
+>>>>> Is there a way of checking a HTML::Template template to see if it expecting an array for a particular value?
+>>>>> --[[KathrynAndersen]]
diff --git a/doc/plugins/contrib/report/ikiwiki/directive/report.mdwn b/doc/plugins/contrib/report/ikiwiki/directive/report.mdwn
new file mode 100644
index 000000000..8f8e6b4e8
--- /dev/null
+++ b/doc/plugins/contrib/report/ikiwiki/directive/report.mdwn
@@ -0,0 +1,149 @@
+[[!toc]]
+The `report` directive is supplied by the [[!iki plugins/contrib/report desc=report]] plugin.
+
+This enables one to report on the structured data ("field" values) of
+multiple pages; the output is formatted via a template. This depends
+on the [[plugins/contrib/field]] plugin.
+
+The pages to report on are selected by a PageSpec given by the "pages"
+parameter. The template is given by the "template" parameter.
+The template expects the data from a single page; it is applied
+to each matching page separately, one after the other.
+
+Additional parameters can be used to fill out the template, in
+addition to the "field" values. Passed-in values override the
+"field" values.
+
+There are two places where template files can live. One is in the
+/templates directory on the wiki. These templates are wiki pages, and
+can be edited from the web like other wiki pages.
+
+The second place where template files can live is in the global
+templates directory (the same place where the page.tmpl template lives).
+This is a useful place to put template files if you want to prevent
+them being edited from the web, and you don't want to have to make
+them work as wiki pages.
+
+## OPTIONS
+
+**template**: The template to use for the report.
+
+**pages**: A PageSpec to determine the pages to report on.
+
+**trail**: A page or pages to use as a "trail" page.
+
+When a trail page is used, the matching pages are limited to (a subset
+of) the pages which that page links to; the "pages" pagespec in this
+case, rather than selecting pages from the entire wiki, will select
+pages from within the set of pages given by the trail page.
+
+Additional space-separated trail pages can be given in this option.
+For example:
+
+ trail="animals/cats animals/dogs"
+
+This will take the links from both the "animals/cats" page and the
+"animals/dogs" page as the set of pages to apply the PageSpec to.
+
+**sort**: A SortSpec to determine how the matching pages should be sorted.
+
+**here_only**: Report on the current page only.
+
+This is useful in combination with "prev_" and "next_" variables to
+make a navigation trail.
+If the current page doesn't match the pagespec, then no pages will
+be reported on.
+
+### Headers
+
+An additional option is the "headers" option. This is a space-separated
+list of field names which are to be used as headers in the report. This
+is a way of getting around one of the limitations of HTML::Template, that
+is, not being able to do tests such as
+"if this-header is not equal to previous-header".
+
+Instead, that logic is performed inside the plugin. The template is
+given parameters "HEADER1", "HEADER2" and so on, for each header.
+If the value of a header field is the same as the previous value,
+then HEADER**N** is set to be empty, but if the value of the header
+field is new, then HEADER**N** is given that value.
+
+#### Example
+
+Suppose you're writing a blog in which you record "moods", and you
+want to display your blog posts by mood.
+
+ \[[!report template="mood_summary"
+ pages="blog/*"
+ sort="Mood Date title"
+ headers="Mood"]]
+
+The "mood_summary" template might be like this:
+
+ <TMPL_IF NAME="HEADER1">
+ ## <TMPL_VAR NAME="HEADER1">
+ </TMPL_IF>
+ ### <TMPL_VAR NAME="TITLE">
+ (<TMPL_VAR NAME="DATE">) \[[<TMPL_VAR NAME="PAGE">]]
+ <TMPL_VAR NAME="DESCRIPTION">
+
+### Advanced Options
+
+The following options are used to improve efficiency when dealing
+with large numbers of pages; most people probably won't need them.
+
+**doscan**:
+
+Whether this report should be called in "scan" mode; if it is, then
+the pages which match the pagespec are added to the list of links from
+this page. This can be used by *another* report by setting this
+page to be a "trail" page in *that* report.
+It is not possible to use "trail" and "doscan" at the same time.
+By default, "doscan" is false.
+
+## TEMPLATE PARAMETERS
+
+The templates are in HTML::Template format, just as [[plugins/template]] and
+[[ftemplate]] are. The parameters passed in to the template are as follows:
+
+### Fields
+
+The structured data from the current matching page. This includes
+"title" and "description" if they are defined.
+
+### Common values
+
+Values known for all pages: "page", "destpage". Also "basename" (the
+base name of the page).
+
+### Passed-in values
+
+Any additional parameters to the report directive are passed to the
+template; a parameter will override the matching "field" value.
+For example, if you have a "Mood" field, and you pass Mood="bad" to
+the report, then that will be the Mood which is given for the whole
+report.
+
+Generally this is useful if one wishes to make a more generic
+template and hide or show portions of it depending on what
+values are passed in the report directive call.
+
+For example, one could have a "hide_mood" parameter which would hide
+the "Mood" section of your template when it is true, which one could
+use when the Mood is one of the headers.
+
+### Prev_ And Next_ Items
+
+Any of the above variables can be prefixed with "prev_" or "next_"
+and that will give the previous or next value of that variable; that is,
+the value from the previous or next page that this report is reporting on.
+This is mainly useful for a "here_only" report.
+
+### Headers
+
+See the section on Headers.
+
+### First and Last
+
+If this is the first page-record in the report, then "first" is true.
+If this is the last page-record in the report, then "last" is true.
diff --git a/doc/plugins/contrib/tracking.mdwn b/doc/plugins/contrib/tracking.mdwn
new file mode 100644
index 000000000..06d4120cd
--- /dev/null
+++ b/doc/plugins/contrib/tracking.mdwn
@@ -0,0 +1,30 @@
+[[!template id=plugin name=tracking author="[[BerndZeimetz]]"]]
+[[!toc]]
+[[!tag plugins]] [[!tag patch]] [[!tag wishlist]]
+
+## NAME
+
+IkiWiki::Plugin::tracking - enable google/piwik visitor tracking
+
+## SYNOPSIS
+
+ # activate the plugin
+ add_plugins => [qw{goodstuff tracking ....}],
+
+ # to use Piwik:
+ piwik_id => '1',
+ piwik_https_url => "https://ssl.example.com/piwik/",
+ piwik_http_url => "http://www.example.com/piwik/",
+
+ # to use Google Analytics:
+ google_analytics_id => "UA-xxxxxx-x"
+
+## DESCRIPTION
+
+This plugin includes the necessary tracking codes for Piwik and/or Google Analytics on all pages. Tracking codes will only be included if the necessary config options are set. The plugin could be enhanced to support goals/profiles and similar things, but I do not plan to do so.
+
+## DOWNLOAD
+
+* single files: [tracking.pm](http://git.recluse.de/?p=users/bzed/ikiwiki.git;a=blob;f=IkiWiki/Plugin/tracking.pm;hb=refs/heads/tracking) [piwik.tmpl](http://git.recluse.de/?p=users/bzed/ikiwiki.git;a=blob;f=templates/piwik.tmpl;hb=refs/heads/tracking) [google_analytics.tmpl](http://git.recluse.de/?p=users/bzed/ikiwiki.git;a=blob;f=templates/google_analytics.tmpl;hb=refs/heads/tracking)
+* browse repository: <http://git.recluse.de/?p=users/bzed/ikiwiki.git;a=shortlog;h=refs/heads/tracking>
+* git repo: `git://git.recluse.de/users/bzed/ikiwiki.git` or <http://git.recluse.de/repos/users/bzed/ikiwiki.git> (Use the tracking branch)
diff --git a/doc/plugins/contrib/xslt/discussion.mdwn b/doc/plugins/contrib/xslt/discussion.mdwn
index 9cda02f88..72cce083c 100644
--- a/doc/plugins/contrib/xslt/discussion.mdwn
+++ b/doc/plugins/contrib/xslt/discussion.mdwn
@@ -20,3 +20,30 @@ possible. Can it also read other arbitrary files, run other programs, etc?
> For the second point, I think the main concern would be resource usage. XSLT is a pretty limited language; it can read other XML files, but it can't run other programs so far as I know.
> -- [[KathrynAndersen]]
+
+>> XSLT is, indeed, a Turing-complete programming language.
+ However, [XML::LibXSLT][] provides a set of functions to help
+ to minimize the damage that may be caused by running a random
+ program.
+
+>> In particular, `max_depth ()` allows for the maximum
+ recursion depth to be set, while
+ `read_file ()`, `write_file ()`, `create_dir ()`,
+ `read_net ()` and `write_net ()`
+ are the callbacks that allow any of the possible file
+ operations to be denied.
+
+>> To be honest, I'd prefer for the `read_file ()` callback to
+ only grant access to the files below the Ikiwiki source
+ directory, and for all the `write_`&hellip; and
+ &hellip;`_net` callbacks to deny the access unconditionally.
+
+>> One more wishlist item: allow the set of locations to take
+ `.xsl` files from to be preconfigured, so that, e.&nbsp;g.,
+ one could allow (preasumably trusted) system stylesheets,
+ while disallowing any stylesheets that are placed on the Wiki
+ itself.
+
+>> &mdash;&nbsp;Ivan Shmakov, 2010-03-28Z.
+
+[XML::LibXSLT]: http://search.cpan.org/~PAJAS/XML-LibXSLT/LibXSLT.pm
diff --git a/doc/plugins/contrib/ymlfront.mdwn b/doc/plugins/contrib/ymlfront.mdwn
new file mode 100644
index 000000000..6dd8ed532
--- /dev/null
+++ b/doc/plugins/contrib/ymlfront.mdwn
@@ -0,0 +1,103 @@
+[[!template id=plugin name=ymlfront author="[[rubykat]]"]]
+[[!tag type/meta]]
+[[!toc]]
+## NAME
+
+IkiWiki::Plugin::ymlfront - add YAML-format data to a page
+
+## SYNOPSIS
+
+ # activate the plugin
+ add_plugins => [qw{goodstuff ymlfront ....}],
+
+## DESCRIPTION
+
+This plugin provides a way of adding arbitrary meta-data (data fields) to any
+page by prefixing the page with a YAML-format document. This provides a way to
+create per-page structured data, where each page is treated like a record, and
+the structured data are fields in that record. This can include the meta-data
+for that page, such as the page title.
+
+This plugin is meant to be used in conjunction with the [[field]] plugin.
+
+## DETAILS
+
+The YAML-format data in a page must be placed at the start of the page
+and delimited by lines containing precisely three dashes. The "normal"
+content of the page then follows.
+
+For example:
+
+ ---
+ title: Foo does not work
+ Urgency: High
+ Status: Assigned
+ AssignedTo: Fred Nurk
+ Version: 1.2.3
+ ---
+ When running on the Sprongle system, the Foo function returns incorrect data.
+
+What will normally be displayed is everything following the second line of dashes.
+That will be htmlized using the page-type of the page-file.
+
+### Accessing the Data
+
+There are a few ways to access the data given in the YAML section.
+
+* [[getfield]] plugin
+
+ The **getfield** plugin can display the data as individual variable values.
+
+ For example:
+
+ ---
+ title: Foo does not work
+ Urgency: High
+ Status: Assigned
+ AssignedTo: Fred Nurk
+ Version: 1.2.3
+ ---
+ # {{$title}}
+
+ **Urgency:** {{$Urgency}}\\
+ **Status:** {{$Status}}\\
+ **Assigned To:** {{$AssignedTo}}\\
+ **Version:** {{$Version}}
+
+ When running on the Sprongle system, the Foo function returns incorrect data.
+
+* [[ftemplate]] plugin
+
+ The **ftemplate** plugin is like the [[plugins/template]] plugin, but it is also aware of [[field]] values.
+
+ For example:
+
+ ---
+ title: Foo does not work
+ Urgency: High
+ Status: Assigned
+ AssignedTo: Fred Nurk
+ Version: 1.2.3
+ ---
+ \[[!ftemplate id="bug_display_template"]]
+
+ When running on the Sprongle system, the Foo function returns incorrect data.
+
+* [[report]] plugin
+
+ The **report** plugin is like the [[ftemplate]] plugin, but it reports on multiple pages, rather than just the current page.
+
+* write your own plugin
+
+ In conjunction with the [[field]] plugin, you can write your own plugin to access the data.
+
+## PREREQUISITES
+
+ IkiWiki
+ IkiWiki::Plugin::field
+ YAML::Any
+
+## DOWNLOAD
+
+* browse at GitHub: <http://github.com/rubykat/ikiplugins/blob/master/IkiWiki/Plugin/ymlfront.pm>
+* git repo at git://github.com/rubykat/ikiplugins.git
diff --git a/doc/plugins/contrib/ymlfront/discussion.mdwn b/doc/plugins/contrib/ymlfront/discussion.mdwn
new file mode 100644
index 000000000..b5c08fedd
--- /dev/null
+++ b/doc/plugins/contrib/ymlfront/discussion.mdwn
@@ -0,0 +1,13 @@
+My field-etc branch in git://git.pseudorandom.co.uk/git/smcv/ikiwiki.git (gitweb:
+<http://git.pseudorandom.co.uk/smcv/ikiwiki.git?a=shortlog;h=refs/heads/field-etc>)
+has some fixes for compatibility with old YAML modules, mostly done by imitating
+Joey's code in IkiWiki::Setup::Yaml. Please consider merging :-) --[[smcv]]
+
+> I would if I could *find* it. I checked out the "field-etc" branch, but I can't find the plugins in question under IkiWiki/Plugin; am I looking in the wrong place, or what?
+> --[[KathrynAndersen]]
+
+>> Sorry, I accidentally removed `field-etc` by pushing with `--mirror` from a
+>> different checkout. I've put it back; it's a branch from your `ikiplugins.git`,
+>> so yes, the code should be in `IkiWiki/Plugin`. --[[smcv]]
+
+>>> Done a while back, but now I've actually pushed to my repo. --[[KathrynAndersen]]