aggregate: Support atom feeds with only a summary element, and no content elements.
parent
0ca6aef1e9
commit
1cb4154bc8
|
@ -520,12 +520,18 @@ sub aggregate (@) { #{{{
|
|||
}
|
||||
|
||||
foreach my $entry ($f->entries) {
|
||||
my $content=$content=$entry->content;
|
||||
# atom feeds may have no content, only a summary
|
||||
if (! defined $content) {
|
||||
$content=$entry->summary;
|
||||
}
|
||||
|
||||
add_page(
|
||||
feed => $feed,
|
||||
copyright => $f->copyright,
|
||||
title => defined $entry->title ? decode_entities($entry->title) : "untitled",
|
||||
link => $entry->link,
|
||||
content => defined $entry->content->body ? $entry->content->body : "",
|
||||
content => defined $content ? $content->body : "",
|
||||
guid => defined $entry->id ? $entry->id : time."_".$feed->{name},
|
||||
ctime => $entry->issued ? ($entry->issued->epoch || time) : time,
|
||||
);
|
||||
|
|
|
@ -3,6 +3,8 @@ ikiwiki (2.65) UNRELEASED; urgency=low
|
|||
* aggregate: Allow expirecount to work on the first pass. (expireage still
|
||||
needs to wait for the pages to be rendered though)
|
||||
* editdiff: Broken since 2.62 due to wrong syntax, now fixed.
|
||||
* aggregate: Support atom feeds with only a summary element, and no content
|
||||
elements.
|
||||
|
||||
-- Joey Hess <joeyh@debian.org> Wed, 17 Sep 2008 14:26:56 -0400
|
||||
|
||||
|
|
|
@ -40,3 +40,7 @@ Two things aren't working as I'd expect:
|
|||
> parsers are more lenient. --[[Joey]]
|
||||
|
||||
>> Thanks for the quick response (and the `expirecount` fix); I've forwarded it to David so he can fix his feed. Nathan's Atom feed validates -- it's generated by the same CMS as mine -- so I'm still at a loss on that one. --[[schmonz]]
|
||||
|
||||
>>> Nathan's feed contains only summary elements, with no content elements.
|
||||
>>> This is legal according to the Atom spec, so I've fixed ikiwiki to use
|
||||
>>> the summary if no content is available. --[[Joey]]
|
||||
|
|
Loading…
Reference in New Issue