From: Simon McVittie Date: Mon, 15 Sep 2014 20:52:03 +0000 (+0100) Subject: Merge branch 'ready/templatebody' X-Git-Tag: 3.20140916~10 X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/commitdiff_plain/7f5c2cfa5a987d887f42d6db95f80f42ceb3b5ff?hp=--cc Merge branch 'ready/templatebody' --- 7f5c2cfa5a987d887f42d6db95f80f42ceb3b5ff diff --cc doc/ikiwiki/directive/edittemplate.mdwn index 6269f5dd8,b3177daa8..70bd2ad25 --- a/doc/ikiwiki/directive/edittemplate.mdwn +++ b/doc/ikiwiki/directive/edittemplate.mdwn @@@ -25,22 -26,17 +26,29 @@@ the above example, it might look someth Version: Reproducible: y/n Details: + ENDBODY]] The template page can also contain [[!cpan HTML::Template]] directives, -like other ikiwiki [[templates]]. Currently only one variable is -set: `` is replaced with the name of the page being -created. +like other ikiwiki [[templates]]. + +These variables might be set: + +* `` is replaced with the name of the page being + created. + +* `` is replaced with a version 4 (random) UUID + suitable for use in `\[[!meta guid="urn:uuid:"]]`. + (Requires the `UUID::Tiny` Perl module if not running on Linux.) + +* `` is replaced with the current (template generation) + time using a fixed format (RFC 3339, `%Y-%m-%dT%H:%M:%SZ`), + suitable for use in `\[[!meta date=""]]` + (see [[meta]]) or `\[[!date ""]]` (see [[date]]). + Text outside the [[templatebody]] directive is not part of the template, + and can be used to document it. + + If the template does not contain a [[templatebody]] directive, the entire + source of the page is used for the template. This is deprecated. + [[!meta robots="noindex, follow"]]