From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-2.9 required=3.0 tests=ALL_TRUSTED,AWL,BAYES_00, RP_MATCHES_RCVD shortcircuit=no autolearn=unavailable version=3.3.2 X-Original-To: meta@public-inbox.org Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 9341A202F4 for ; Sat, 13 Feb 2016 22:50:29 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH] feed: favor relative URL to Atom feed in HTML Date: Sat, 13 Feb 2016 22:50:29 +0000 Message-Id: <20160213225029.16219-1-e@80x24.org> List-Id: Normal browsers should understand relative path names. Atom feeds may be hosted externally and seems to need full URLs. --- lib/PublicInbox/Feed.pm | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/PublicInbox/Feed.pm b/lib/PublicInbox/Feed.pm index bbc89f2..a0aa62a 100644 --- a/lib/PublicInbox/Feed.pm +++ b/lib/PublicInbox/Feed.pm @@ -121,12 +121,11 @@ sub emit_html_index { my $title = $feed_opts->{description} || ''; $title = PublicInbox::Hval->new_oneline($title)->as_html; - my $atom_url = $feed_opts->{atomurl}; my ($footer, $param, $last); my $state = { ctx => $ctx, seen => {}, anchor_idx => 0 }; my $srch = $ctx->{srch}; - my $top = "$title (Atom feed)"; + my $top = "$title (Atom feed)"; if ($srch) { $top = qq{
$top} .
@@ -139,7 +138,7 @@ sub emit_html_index {
 
 	$fh->write("$title" .
 		   "" .
+		   "href=\"new.atom\"\ntype=\"application/atom+xml\"/>" .
 		   PublicInbox::Hval::STYLE .
 		   "$top");
 
-- 
EW