From 7aa10a2952a0d0ee8543f575966f7e4a780c993c Mon Sep 17 00:00:00 2001 From: Jonathon Anderson Date: Fri, 25 Jan 2013 08:42:23 +0300 Subject: Provide a UUID in edittemplate templates. I want to make GUIDs for my RSS feeds that don't change when I move pages around. To that end, I've used UUID::Tiny to generate a version 4 (random) UUID that is presented in a `uuid` variable in the template. At that point, you can do something like this: [[!meta guid="urn:uuid:"]] --- doc/ikiwiki/directive/edittemplate.mdwn | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'doc/ikiwiki/directive') diff --git a/doc/ikiwiki/directive/edittemplate.mdwn b/doc/ikiwiki/directive/edittemplate.mdwn index a6f301dd3..151fd203a 100644 --- a/doc/ikiwiki/directive/edittemplate.mdwn +++ b/doc/ikiwiki/directive/edittemplate.mdwn @@ -27,8 +27,14 @@ something like: Details: 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]]. + +Two variables might be set: + +* `` is replaced with the name of the page being + created. + +* `` is replaced with a version 4 (random) UUID. + (Requires the `UUID::Tiny` Perl module.) [[!meta robots="noindex, follow"]] -- cgit v1.2.3