From 6806ddfdff5e17ec85683d38bad814a46ffa4efe Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Mon, 1 Sep 2014 08:56:46 +0100 Subject: [PATCH] Only provide time, not formatted_time, to edittemplate templates I'm not sure what the use-case is for formatted_time, and chrysn pointed out that for display in HTML, [[!date ""]] would be nicer. --- IkiWiki/Plugin/edittemplate.pm | 1 - doc/ikiwiki/directive/edittemplate.mdwn | 5 +---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/IkiWiki/Plugin/edittemplate.pm b/IkiWiki/Plugin/edittemplate.pm index c61f6336b..947c8f215 100644 --- a/IkiWiki/Plugin/edittemplate.pm +++ b/IkiWiki/Plugin/edittemplate.pm @@ -157,7 +157,6 @@ sub filltemplate ($$) { my $time = time(); $template->param(time => IkiWiki::formattime($time, "%Y-%m-%d %H:%M:%S")); - $template->param(formatted_time => IkiWiki::formattime($time)); return $template->output; } diff --git a/doc/ikiwiki/directive/edittemplate.mdwn b/doc/ikiwiki/directive/edittemplate.mdwn index 22767de43..13e282c11 100644 --- a/doc/ikiwiki/directive/edittemplate.mdwn +++ b/doc/ikiwiki/directive/edittemplate.mdwn @@ -29,7 +29,7 @@ something like: The template page can also contain [[!cpan HTML::Template]] directives, like other ikiwiki [[templates]]. -Four variables might be set: +These variables might be set: * `` is replaced with the name of the page being created. @@ -40,7 +40,4 @@ Four variables might be set: * `` is replaced with the current (template generation) time, using a fixed format, `%Y-%m-%d %H:%M:%S`. -* `