This will allow reasonable titles to be generated for
manpages.
dtxt := $(addprefix Documentation/, $(dtxt)) $(mantxt)
%.html: %.txt
dtxt := $(addprefix Documentation/, $(dtxt)) $(mantxt)
%.html: %.txt
+ TITLE="$(basename $(<F))" $(txt2pre)
use PublicInbox::Hval qw(ascii_html);
my $str = eval { local $/; <> };
use PublicInbox::Hval qw(ascii_html);
my $str = eval { local $/; <> };
-my ($title) = ($str =~ /\A([^\n]+)/);
+my $title = $ENV{TITLE};
+($title) = ($str =~ /\A([^\n]+)/) unless $title;
$title = ascii_html($title);
my $l = PublicInbox::Linkify->new;
$str = $l->linkify_1($str);
$title = ascii_html($title);
my $l = PublicInbox::Linkify->new;
$str = $l->linkify_1($str);