From 1958c7f23e1eddb7850c4a7c882dfe7b379ef58f Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Mon, 5 May 2014 01:07:54 +0000 Subject: feed: add atom feed link to the bottom This should improve navigation as browsers may not make it obvious there is an Atom feed. --- lib/PublicInbox/Feed.pm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'lib/PublicInbox/Feed.pm') diff --git a/lib/PublicInbox/Feed.pm b/lib/PublicInbox/Feed.pm index fcb86023..e9989e41 100644 --- a/lib/PublicInbox/Feed.pm +++ b/lib/PublicInbox/Feed.pm @@ -88,7 +88,7 @@ sub generate_html_index { Email::Address->purge_cache; - my $footer = nav_footer($args->{cgi}, $last); + my $footer = nav_footer($args->{cgi}, $last, $feed_opts); my $list_footer = $args->{footer}; $footer .= "\n" . $list_footer if ($footer && $list_footer); $footer = "
$footer
" if $footer; @@ -98,7 +98,7 @@ sub generate_html_index { # private subs sub nav_footer { - my ($cgi, $last) = @_; + my ($cgi, $last, $feed_opts) = @_; $cgi or return ''; my $old_r = $cgi->param('r'); my $head = ' '; @@ -111,7 +111,8 @@ sub nav_footer { $head = $cgi->path_info; $head = qq!head!; } - "$next $head"; + my $atom = "{atomurl}\">atom"; + "$next $head $atom"; } sub each_recent_blob { -- cgit v1.2.3-24-ge0c7