From 8c0e57d054cf0facd034f16c01032199b787415c Mon Sep 17 00:00:00 2001 From: Matias Linares Date: Sat, 1 Apr 2017 13:20:01 -0300 Subject: Add sidebar option --- ssg | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/ssg b/ssg index d2faa90..4f39a06 100755 --- a/ssg +++ b/ssg @@ -15,9 +15,11 @@ my $outdir; my $VERSION = "v0.1"; my @exlude_files = ( - qr/TIL\/\w+\/*/ + qr/log\/\w+\/*/ ); +my $with_sidebar = 1; + sub help { print<

-Deprecated Just coding for fun +Deprecated Coding for fun

@@ -100,6 +105,7 @@ sub generate_link { # Exclude links given($file) { when(@exlude_files) { + say "excluding $file"; return ""; } default { @@ -202,9 +208,10 @@ sub run_on { my %opts = ( 'v' => 0, 'h' => 0, - 'o' => "site.static/" + 'o' => "site.static/", + 's' => 1, ); -getopts('vho:', \%opts); +getopts('svho:', \%opts); $indir = shift @ARGV; if($opts{h}) { @@ -220,6 +227,10 @@ if(-d $opts{o}) { remove_tree($opts{o}); } +if($opts{s}) { + $with_sidebar = $opts{s}; +} + mkdir $opts{o}; $outdir = $opts{o}; -- cgit v1.2.3-70-g09d2