diff options
author | Joey Hess <joey@gnu.kitenet.net> | 2010-04-15 13:40:53 -0400 |
---|---|---|
committer | Joey Hess <joey@gnu.kitenet.net> | 2010-04-15 13:40:53 -0400 |
commit | 3131433f64235ad5425eb93d5773580b607876fb (patch) | |
tree | f92e1875f8b3ad155ecc75414eaafab6d98d9969 /ikiwiki-calendar.in | |
parent | 81ce1cf9daf113c88581407d5e68d8f6ee61d674 (diff) | |
download | ikiwiki-3131433f64235ad5425eb93d5773580b607876fb.tar ikiwiki-3131433f64235ad5425eb93d5773580b607876fb.tar.gz |
calendar: Add archive_pagespec, which is used by ikiwiki-calendar to specify which pages to include on the calendar archive pages. (The pagespec can still also be specified on the ikiwiki-calendar command line.)
Diffstat (limited to 'ikiwiki-calendar.in')
-rwxr-xr-x | ikiwiki-calendar.in | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ikiwiki-calendar.in b/ikiwiki-calendar.in index 9738ea5f7..6b6f693b3 100755 --- a/ikiwiki-calendar.in +++ b/ikiwiki-calendar.in @@ -15,7 +15,7 @@ GetOptions( "force" => \$force, ) || usage(); my $setup=shift || usage(); -my $pagespec=shift || "*"; +my $pagespec=shift; my $startyear=shift || 1900+(localtime(time))[5]; my $endyear=shift || $startyear; @@ -27,6 +27,10 @@ IkiWiki::checkconfig(); my $archivebase = 'archives'; $archivebase = $config{archivebase} if defined $config{archivebase}; +if (! defined $pagespec) { + $pagespec=$config{archive_pagespec} || "*"; +} + sub writearchive ($$;$) { my $template=template(shift); my $year=shift; |