Make aggregated items be internal pages if --aggregateinternal is used.

This addresses <http://ikiwiki.info/todo/aggregate_to_internal_pages/>
in a simple way. With this approach, a flag day is required, on which all
users of aggregated pages start to inline them using the internal() pagespec;
after that, the aggregateinternal option can safely be switched on in the
setup file (and the old aggregated pages can be deleted by hand).
master
Simon McVittie 2008-07-12 18:15:11 +01:00
parent ee4e6058e3
commit 5c0896e674
1 changed files with 5 additions and 2 deletions

View File

@ -30,7 +30,10 @@ sub getopt () { #{{{
eval q{use Getopt::Long};
error($@) if $@;
Getopt::Long::Configure('pass_through');
GetOptions("aggregate" => \$config{aggregate});
GetOptions(
"aggregate" => \$config{aggregate},
"aggregateinternal!" => \$config{aggregateinternal},
);
} #}}}
sub checkconfig () { #{{{
@ -595,7 +598,7 @@ sub pagefile ($) { #{{{
} #}}}
sub htmlfn ($) { #{{{
return shift().".".$config{htmlext};
return shift().".".($config{aggregateinternal} ? "_" : "").$config{htmlext};
} #}}}
my $aggregatelock;