about summary refs log tree commit homepage
path: root/lib/PublicInbox/Feed.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2014-05-05 01:07:54 +0000
committerEric Wong <e@80x24.org>2014-05-05 01:07:54 +0000
commit1958c7f23e1eddb7850c4a7c882dfe7b379ef58f (patch)
tree5e1b11914a4d6532a75f5fae9e4b6689df10c9ac /lib/PublicInbox/Feed.pm
parent48cb5c39661bf54c40ad393dcaa2f2f54793b715 (diff)
downloadpublic-inbox-1958c7f23e1eddb7850c4a7c882dfe7b379ef58f.tar.gz
This should improve navigation as browsers may not make it
obvious there is an Atom feed.
Diffstat (limited to 'lib/PublicInbox/Feed.pm')
-rw-r--r--lib/PublicInbox/Feed.pm7
1 files changed, 4 insertions, 3 deletions
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 = "<hr /><pre>$footer</pre>" 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!<a href="$head">head</a>!;
         }
-        "$next $head";
+        my $atom = "<a href=\"$feed_opts->{atomurl}\">atom</a>";
+        "$next $head $atom";
 }
 
 sub each_recent_blob {