X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/c96d672810ae524aedf9ffff08dcca773cd9a876..f0e2ce4360a029f53ede032416acb311060aa79b:/doc/todo/datearchives-plugin.mdwn?ds=inline diff --git a/doc/todo/datearchives-plugin.mdwn b/doc/todo/datearchives-plugin.mdwn index 8c3faf9ca..5f33cde4c 100644 --- a/doc/todo/datearchives-plugin.mdwn +++ b/doc/todo/datearchives-plugin.mdwn @@ -17,11 +17,11 @@ Index: IkiWiki/Plugin/datearchives.pm +use strict; +use IkiWiki; + -+sub import { #{{{ ++sub import { + hook(type => "pagetemplate", id => "datearchives", call => \&pagetemplate, scan => 1); -+} # }}} ++} + -+sub pagetemplate (@) { #{{{ ++sub pagetemplate (@) { + my %args = @_; + my $dt; + eval { @@ -37,12 +37,14 @@ Index: IkiWiki/Plugin/datearchives.pm + $template->param(ctime => htmllink( $args{page}, $args{destpage}, $link, 0, 0, + $template->param('ctime'))); + } -+} # }}} ++} + +1 -This works (although accessing `%IkiWiki::pagectime` is not too clever), but it would be far more useful if the date pages were automatically created and populated with the relevant posts. A [[Pagespec]] works perfectly for displaying the relevant content, but we're still left with the issue of actually creating the page. What's the Right Way to do this? We could create them in the RCS working copy and check them in, or create them directly in the output directory... (I'd also like to create an option for the tags plugin to auto-create its targets in the same way). Any opinions? :-) +This works (although accessing `%IkiWiki::pagectime` is not too clever), +but it would be far more useful if the date pages were automatically +created and populated with the relevant posts. A [[ikiwiki/Pagespec]] works perfectly for displaying the relevant content, but we're still left with the issue of actually creating the page. What's the Right Way to do this? We could create them in the RCS working copy and check them in, or create them directly in the output directory... (I'd also like to create an option for the tags plugin to auto-create its targets in the same way). Any opinions? :-) > Ok, first, I don't understand what your plugin does. Maybe I need to get > some sleep, but a better explanation might help. :-) It seems to make @@ -72,4 +74,4 @@ This works (although accessing `%IkiWiki::pagectime` is not too clever), but it >>> might move it to the contributed plugins directory as it's a bit >>> specialised to be included in ikiwiki though. --[[Joey]] -[[tag patch]] +[[!tag patch]]