diff options
author | Simon McVittie <http://smcv.pseudorandom.co.uk/> | 2008-07-12 18:15:11 +0100 |
---|---|---|
committer | Simon McVittie <http://smcv.pseudorandom.co.uk/> | 2008-07-12 18:15:11 +0100 |
commit | 5c0896e674eb69f45acb2837cd6fb231cef32a45 (patch) | |
tree | f6ab36f2a0f19ef988ce27168fe659498780183e | |
parent | ee4e6058e3ac8007f2afe042f7db60e94ccd6f7b (diff) |
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).
-rw-r--r-- | IkiWiki/Plugin/aggregate.pm | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/IkiWiki/Plugin/aggregate.pm b/IkiWiki/Plugin/aggregate.pm index b5354a823..4fbcde390 100644 --- a/IkiWiki/Plugin/aggregate.pm +++ b/IkiWiki/Plugin/aggregate.pm @@ -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; |