]> Sergey Matveev's repositories - public-inbox.git/commitdiff
view: extra Atom feed link in standalone message view
authorEric Wong <e@80x24.org>
Sun, 13 Sep 2015 23:25:05 +0000 (23:25 +0000)
committerEric Wong <e@80x24.org>
Sun, 13 Sep 2015 23:25:05 +0000 (23:25 +0000)
It might be helpful if user agents do not display the <link>
element in <head>.

lib/PublicInbox/View.pm

index 7e1fb04573d42306fa162f92c0356edab7f78059..6cb340b0df9206c2490c265df2313caded4c0ec1 100644 (file)
@@ -544,6 +544,10 @@ sub html_footer {
        my $srch = $ctx->{srch} if $ctx;
        my $upfx = $full_pfx ? '../' : '../../';
        my $idx = $standalone ? " <a\nhref=\"$upfx\">index</a>" : '';
+
+       if ($srch && $standalone) {
+               $idx .= qq{ / follow: <a\nhref="t.atom">Atom feed</a>};
+       }
        if ($idx && $srch) {
                my ($next, $p) = thread_inline(\$idx, $ctx, $mime, $full_pfx);
                if (defined $p) {