summaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin
diff options
context:
space:
mode:
authorSimon McVittie <http://smcv.pseudorandom.co.uk/>2008-07-12 15:20:28 +0100
committerSimon McVittie <http://smcv.pseudorandom.co.uk/>2008-07-12 17:09:41 +0100
commit2bd8ada5a619a1c32bf19f44e4f96e083ceb17b8 (patch)
tree214638dd92ab21523cda104d8ce19fad96f27d10 /IkiWiki/Plugin
parent50ec532bba1b4b319e598d8d424e79457465946a (diff)
Accept [[!inline ... atomid="..."]] and use it to populate the feed's Atom <id>.
This is often the same as the feed's <link> (in which case it can be omitted) but sometimes it's a urn:uuid: URN instead.
Diffstat (limited to 'IkiWiki/Plugin')
-rw-r--r--IkiWiki/Plugin/inline.pm8
1 files changed, 5 insertions, 3 deletions
diff --git a/IkiWiki/Plugin/inline.pm b/IkiWiki/Plugin/inline.pm
index 02c04cc00..802fae93a 100644
--- a/IkiWiki/Plugin/inline.pm
+++ b/IkiWiki/Plugin/inline.pm
@@ -308,7 +308,7 @@ sub preprocess_inline (@) { #{{{
if (! $params{preview}) {
writefile($rssp, $config{destdir},
genfeed("rss",
- $config{url}."/".rsspage($params{destpage}).$feednum, $desc, $params{destpage}, @feedlist));
+ $config{url}."/".rsspage($params{destpage}).$feednum, $desc, $params{atomid}, $params{destpage}, @feedlist));
$toping{$params{destpage}}=1 unless $config{rebuild};
$feedlinks{$params{destpage}}=qq{<link rel="alternate" type="application/rss+xml" title="RSS" href="$rssurl" />};
}
@@ -318,7 +318,7 @@ sub preprocess_inline (@) { #{{{
will_render($params{destpage}, $atomp);
if (! $params{preview}) {
writefile($atomp, $config{destdir},
- genfeed("atom", $config{url}."/".atompage($params{destpage}).$feednum, $desc, $params{destpage}, @feedlist));
+ genfeed("atom", $config{url}."/".atompage($params{destpage}).$feednum, $desc, $params{atomid}, $params{destpage}, @feedlist));
$toping{$params{destpage}}=1 unless $config{rebuild};
$feedlinks{$params{destpage}}=qq{<link rel="alternate" type="application/atom+xml" title="Atom" href="$atomurl" />};
}
@@ -411,10 +411,11 @@ sub atompage ($) { #{{{
return targetpage(shift, "atom");
} #}}}
-sub genfeed ($$$$@) { #{{{
+sub genfeed ($$$$$@) { #{{{
my $feedtype=shift;
my $feedurl=shift;
my $feeddesc=shift;
+ my $atomid=shift;
my $page=shift;
my @pages=@_;
@@ -484,6 +485,7 @@ sub genfeed ($$$$@) { #{{{
pageurl => $url,
content => $content,
feeddesc => $feeddesc,
+ atomid => $atomid,
feeddate => date_3339($lasttime),
feedurl => $feedurl,
version => $IkiWiki::version,