]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/WwwStream.pm
git: allow cloning from the URL root, too
[public-inbox.git] / lib / PublicInbox / WwwStream.pm
index 6de1b310da360bbbee5bcbd580b7d552bc2b8298..87a461e18b831744535f93f5e4e2b8ce2bc2f4ae 100644 (file)
@@ -7,7 +7,7 @@ use strict;
 use warnings;
 use PublicInbox::Hval qw(ascii_html);
 use URI;
-use constant PI_URL => 'https://public-inbox.org/README.html';
+use constant PI_URL => 'https://public-inbox.org/';
 
 sub new {
        my ($class, $ctx, $cb) = @_;
@@ -39,7 +39,8 @@ sub _html_top ($) {
                }
                # XXX gross, for SearchView.pm
                my $extra = $ctx->{-extra_form_html} || '';
-               $top = qq{<form\naction="$upfx"><pre>$top} .
+               my $action = $upfx eq '' ? './' : $upfx;
+               $top = qq{<form\naction="$action"><pre>$top} .
                          qq{ <input\nname=q\ntype=text$q_val/>} .
                          $extra .
                          qq{<input\ntype=submit\nvalue=search />} .
@@ -85,8 +86,8 @@ sub _html_end {
        '<pre>'.join("\n",
                '- ' . $desc,
                $urls,
-               'served with software from public-inbox: '
-                       ."<a\nhref=\"$url\">$url</a>",
+               'Archived served using code from public-inbox:',
+               "\tgit clone <a\nhref="$url">$url</a> public-inbox",
        ).'</pre></body></html>';
 }