recipes

Recipes
git clone git://lumidify.org/recipes.git (fast, but not encrypted)
git clone https://lumidify.org/git/recipes.git (encrypted, but very slow)
Log | Files | Refs | README

commit f459f3829ec39de8fea3422fd47646917a7385ed
parent ff8f74a57998b9ee0bdb6e8e30007c992bc2521d
Author: lumidify <nobody@lumidify.org>
Date:   Wed,  5 Jul 2023 18:25:51 +0200

Remove duplicate recipe title in html output

Diffstat:
Mgen_recipes.pl | 5++---
1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/gen_recipes.pl b/gen_recipes.pl @@ -30,7 +30,6 @@ sub gen_html { "<title>$title</title>\n" . "</head>\n" . "<body>\n" . - "<h1>$title</h1>\n" . $body . "</body>\n" . "</html>\n"; @@ -138,7 +137,8 @@ sub process_dir { opendir(my $dh, $path) or die "ERROR: Unable to open directory $path\n"; my @files = sort(grep({!/\A(\.\.?|title)\z/} readdir($dh))); closedir($dh); - my $html = "<ul>\n"; + my $title = get_dirtitle($path); + my $html = "<h3>$title</h3>\n<ul>\n"; my $gph = ""; my $gph2 = ""; foreach my $file (@files) { @@ -187,7 +187,6 @@ sub process_dir { $gph .= $back; $gph2 .= $back; } - my $title = get_dirtitle($path); my $tmp = catfile($html_outdir, @$cur_outdirs, "index.html"); open(my $fh, ">", $tmp) or die "ERROR: Unable to open file $tmp.\n"; print($fh gen_html($title, $html));