* Add exclude option in setup files, works same as --exclude.

master
joey 2006-07-28 17:48:24 +00:00
parent 201e681d34
commit a0653933d3
6 changed files with 12 additions and 3 deletions

View File

@ -34,7 +34,8 @@ sub preprocess (@) { #{{{
$tags{$page} = [];
foreach my $tag (keys %params) {
if (exists $IkiWiki::config{tagbase}) {
if (exists $IkiWiki::config{tagbase} &&
defined $IkiWiki::config{tagbase}) {
$tag=$IkiWiki::config{tagbase}."/".$tag;
}
push @{$tags{$page}}, $tag;

View File

@ -30,6 +30,9 @@ sub setup_standard {
}
delete $setup{disable_plugins};
}
if (exists $setup{exclude}) {
$config{wiki_file_prune_regexp}=qr/$config{wiki_file_prune_regexp}|$setup{exclude}/;
}
debug("generating wrappers..");
my @wrappers=@{$setup{wrappers}};

3
debian/changelog vendored
View File

@ -2,8 +2,9 @@ ikiwiki (1.12) UNRELEASED; urgency=low
* Add getopt hook type, this allows plugins to add new command-line options.
* Add --tagbase option to tag plugin.
* Add exclude option in setup files, works same as --exclude.
-- Joey Hess <joeyh@debian.org> Fri, 28 Jul 2006 01:17:48 -0400
-- Joey Hess <joeyh@debian.org> Fri, 28 Jul 2006 13:47:34 -0400
ikiwiki (1.11) unstable; urgency=low

View File

@ -67,6 +67,9 @@ use IkiWiki::Setup::Standard {
#pingurl => [qw{http://rpc.technorati.com/rpc/ping}],
# Include discussion links on all pages?
discussion => 1,
# To exclude files matching a regexp from processing. This adds to
# the default exclude list.
#exclude => qr/\*.wav/,
# Time format (for strftime)
#timeformat => '%c',

View File

@ -13,7 +13,7 @@ BEGIN { use_ok("IkiWiki::Render"); }
# Initialize htmlscrubber plugin
%IkiWiki::config=IkiWiki::defaultconfig();
$IkiWiki::config{srcdir}=$IkiWiki::config{destdir}="/dev/null";
IkiWiki::checkconfig();
IkiWiki::loadplugins(); IkiWiki::checkconfig();
ok(IkiWiki::htmlize("mdwn", IkiWiki::readfile("t/test1.mdwn")));
ok(IkiWiki::htmlize("mdwn", IkiWiki::readfile("t/test3.mdwn")),
"wtf?") for 1..100;

View File

@ -10,6 +10,7 @@ BEGIN { use_ok("IkiWiki::Render"); }
# Initialize htmlscrubber plugin
%IkiWiki::config=IkiWiki::defaultconfig();
$IkiWiki::config{srcdir}=$IkiWiki::config{destdir}="/dev/null";
IkiWiki::loadplugins();
IkiWiki::checkconfig();
is(IkiWiki::htmlize("mdwn", "foo\n\nbar\n"), "<p>foo</p>\n\n<p>bar</p>\n",