commit fc5950831193793bc547c535ae59bfa3043ddedf
parent 132a475c740e26d9efcead3f1a85bf7a16fdeccb
Author: cipher <haris@2f30.org>
Date: Thu, 27 Mar 2014 14:20:07 +0200
Added variable for article previewing
Diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/bin/bliper-generate.pl b/bin/bliper-generate.pl
@@ -16,6 +16,7 @@ my @paget = qx(cat template/page-top); # top section for every page in pages/
my @pageb = qx(cat template/page-bottom); # bottom section for every page in pages/
my @articlet = qx(cat template/article-top); # top section for every article in main-articles/
my @articleb = qx(cat template/article-bottom); # bottom section for every article in main-articles/
+my $previewnum = 3; # article number preview for frontpage
unlink glob "output/*.html"; # remove old pages
unlink "output/tmp"; # file which stores menu
@@ -78,7 +79,7 @@ foreach my $file (@files) { # Read each file(post) from indir, cat to $outdi
my @preview_array = split(/\n{2,}/, $html); # Pull title and first paragraph from article.
$preview_array[0] =~ s/<h1/<h3/g; # change h1 to h3 for the index page.
- if ($i < 2) { # append links to stories in index.html
+ if ($i < $previewnum) { # append links to stories in index.html
open (OUT, '>>', "../$outdir/index.html") or die $!;
print OUT "<div class=\"preview\">
$preview_array[0]