gitweb: channel image in rss feed
Define the channel image for the rss feed when the logo or favicon are defined, preferring the former to the latter. As suggested in the RSS 2.0 specifications, the image's title and link as set to the same as the channel's. Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
85b4518f44
commit
1ba68ce237
@ -6075,6 +6075,16 @@ XML
|
|||||||
"<link>$alt_url</link>\n" .
|
"<link>$alt_url</link>\n" .
|
||||||
"<description>$descr</description>\n" .
|
"<description>$descr</description>\n" .
|
||||||
"<language>en</language>\n";
|
"<language>en</language>\n";
|
||||||
|
if (defined $logo || defined $favicon) {
|
||||||
|
# prefer the logo to the favicon, since RSS
|
||||||
|
# doesn't allow both
|
||||||
|
my $img = esc_url($logo || $favicon);
|
||||||
|
print "<image>\n" .
|
||||||
|
"<url>$img</url>\n" .
|
||||||
|
"<title>$title</title>\n" .
|
||||||
|
"<link>$alt_url</link>\n" .
|
||||||
|
"</image>\n";
|
||||||
|
}
|
||||||
} elsif ($format eq 'atom') {
|
} elsif ($format eq 'atom') {
|
||||||
print <<XML;
|
print <<XML;
|
||||||
<feed xmlns="http://www.w3.org/2005/Atom">
|
<feed xmlns="http://www.w3.org/2005/Atom">
|
||||||
|
Loading…
Reference in New Issue
Block a user