summaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin
diff options
context:
space:
mode:
authorJoey Hess <joey@kodama.kitenet.net>2008-01-29 01:48:55 -0500
committerJoey Hess <joey@kodama.kitenet.net>2008-01-29 01:48:55 -0500
commit21f44880cdd8f23264b2416bf39793aadcb87df6 (patch)
tree90507c97f7de0772b2da7418a8db0eafeba7bd1f /IkiWiki/Plugin
parentd72753e100b018dfa82feb06e06fc2ad2c61f4ed (diff)
non-tabular recentchanges display
Doesn't look as good as the old table, but works as a rss feed.
Diffstat (limited to 'IkiWiki/Plugin')
-rw-r--r--IkiWiki/Plugin/recentchanges.pm23
1 files changed, 17 insertions, 6 deletions
diff --git a/IkiWiki/Plugin/recentchanges.pm b/IkiWiki/Plugin/recentchanges.pm
index 6b36ea4c8..fb9841ffd 100644
--- a/IkiWiki/Plugin/recentchanges.pm
+++ b/IkiWiki/Plugin/recentchanges.pm
@@ -67,14 +67,25 @@ sub store ($$) { #{{{
];
push @{$change->{pages}}, { link => '...' } if $is_excess;
+ # Take the first line of the commit message as a summary.
+ my $m=shift @{$change->{message}};
+ $change->{summary}=$m->{line};
+
+ # See if the committer is an openid.
+ my $oiduser=IkiWiki::openiduser($change->{user});
+ if (defined $oiduser) {
+ $change->{authorurl}=$change->{user};
+ $change->{user}=$oiduser;
+ }
+ elsif (length $config{url}) {
+ $change->{authorurl}="$config{url}/".
+ (length $config{userdir} ? "$config{userdir}/" : "").
+ $change->{user};
+ }
+
# Fill out a template with the change info.
my $template=template("change.tmpl", blind_cache => 1);
- $template->param(
- user => IkiWiki::userlink($change->{user}),
- when => IkiWiki::displaytime($change->{when}, "%X %x"),
- pages => $change->{pages},
- message => $change->{message},
- );
+ $template->param(%$change);
$template->param(baseurl => "$config{url}/") if length $config{url};
IkiWiki::run_hooks(pagetemplate => sub {
shift->(page => $page, destpage => $page, template => $template);