]> Sergey Matveev's repositories - public-inbox.git/commitdiff
www: redefinable project name and URL
authorEric Wong <e@80x24.org>
Thu, 21 Jul 2016 01:55:48 +0000 (01:55 +0000)
committerEric Wong <e@80x24.org>
Thu, 21 Jul 2016 02:00:26 +0000 (02:00 +0000)
This should make it easier for folks to run their own forks.

lib/PublicInbox/WwwStream.pm

index de457b4814653fbef34ca737c48634ad417c16ad..ec9ae0cf25b167fc296bb37ada4184923ad3fa13 100644 (file)
@@ -7,8 +7,9 @@ use strict;
 use warnings;
 use PublicInbox::Hval qw(ascii_html);
 use URI;
-use constant PI_URL => 'https://public-inbox.org/';
 our $TOR_URL = 'https://www.torproject.org/';
+our $CODE_URL = 'https://public-inbox.org/';
+our $PROJECT = 'public-inbox';
 
 sub close {}
 
@@ -87,12 +88,12 @@ sub _html_end {
                $urls .= "\n note: .onion URLs require Tor: ";
                $urls .= qq[<a\nhref="$TOR_URL">$TOR_URL</a>];
        }
-       my $url = PublicInbox::Hval::prurl($ctx->{env}, PI_URL);
+       my $url = PublicInbox::Hval::prurl($ctx->{env}, $CODE_URL);
        '<hr><pre>'.join("\n\n",
                $desc,
                $urls,
-               'Served with public-inbox: '.
-               qq(git clone <a\nhref="$url">$url</a> public-inbox)
+               'Code for this site: '.
+               qq(git clone <a\nhref="$url">$url</a> $PROJECT)
        ).'</pre></body></html>';
 }