summaryrefslogtreecommitdiff
path: root/IkiWiki
diff options
context:
space:
mode:
Diffstat (limited to 'IkiWiki')
-rw-r--r--IkiWiki/Plugin/aggregate.pm3
-rw-r--r--IkiWiki/Plugin/inline.pm3
-rw-r--r--IkiWiki/Plugin/meta.pm13
3 files changed, 16 insertions, 3 deletions
diff --git a/IkiWiki/Plugin/aggregate.pm b/IkiWiki/Plugin/aggregate.pm
index d6592fef3..c6ed6b209 100644
--- a/IkiWiki/Plugin/aggregate.pm
+++ b/IkiWiki/Plugin/aggregate.pm
@@ -289,9 +289,8 @@ sub add_page (@) { #{{{
$template->param(title => $params{title})
if defined $params{title} && length($params{title});
$template->param(content => htmlescape(htmlabs($params{content}, $feed->{feedurl})));
- $template->param(url => $feed->{url});
$template->param(name => $feed->{name});
- $template->param(link => urlabs($params{link}, $feed->{feedurl}))
+ $template->param(permalink => urlabs($params{link}, $feed->{feedurl}))
if defined $params{link};
if (ref $feed->{tags}) {
$template->param(tags => [map { tag => $_ }, @{$feed->{tags}}]);
diff --git a/IkiWiki/Plugin/inline.pm b/IkiWiki/Plugin/inline.pm
index d8f2ca0d8..71e71c02e 100644
--- a/IkiWiki/Plugin/inline.pm
+++ b/IkiWiki/Plugin/inline.pm
@@ -173,6 +173,7 @@ sub genrss ($@) { #{{{
$itemtemplate->param(
title => pagetitle(basename($p)),
url => "$config{url}/$renderedfiles{$p}",
+ permalink => "$config{url}/$renderedfiles{$p}",
pubdate => date_822($pagectime{$p}),
content => absolute_urls(get_inline_content($p, $page), $url),
);
@@ -180,6 +181,7 @@ sub genrss ($@) { #{{{
shift->(page => $p, destpage => $page,
template => $itemtemplate);
});
+
$content.=$itemtemplate->output;
$itemtemplate->clear_params;
}
@@ -191,7 +193,6 @@ sub genrss ($@) { #{{{
pageurl => $url,
content => $content,
);
-
run_hooks(pagetemplate => sub {
shift->(page => $page, destpage => $page,
template => $template);
diff --git a/IkiWiki/Plugin/meta.pm b/IkiWiki/Plugin/meta.pm
index bac163469..b6226ed88 100644
--- a/IkiWiki/Plugin/meta.pm
+++ b/IkiWiki/Plugin/meta.pm
@@ -8,6 +8,8 @@ use IkiWiki;
my %meta;
my %title;
+my %permalink;
+my %author;
sub import { #{{{
IkiWiki::hook(type => "preprocess", id => "meta",
@@ -57,9 +59,15 @@ sub preprocess (@) { #{{{
elsif ($key eq 'title') {
$title{$page}=$value;
}
+ elsif ($key eq 'permalink') {
+ $permalink{$page}=$value;
+ }
else {
$meta{$page}.="<meta name=\"".encode_entities($key).
"\" content=\"".encode_entities($value)."\" />\n";
+ if ($key eq 'author') {
+ $author{$page}=$value;
+ }
}
return "";
@@ -74,6 +82,11 @@ sub pagetemplate (@) { #{{{
if exists $meta{$page} && $template->query(name => "meta");
$template->param(title => $title{$page})
if exists $title{$page} && $template->query(name => "title");
+ $template->param(permalink => $permalink{$page})
+ if exists $permalink{$page} && $template->query(name => "permalink");
+ $template->param(author => $author{$page})
+ if exists $author{$page} && $template->query(name => "author");
+
} # }}}
1