- print $fh_w
- $indexes{$path} == 1
- ? &generate('static', $p, '', $flavour, $content_type)
- : &generate('static', '', $p, $flavour, $content_type);
+ if ($indexes{$path} == 1) {
+ # category
+ $path_info = $p;
+ print $fh_w &generate('static', $p, '', $flavour, $content_type);
+ } else {
+ # date
+ local ($path_info_yr,$path_info_mo,$path_info_da, $path_info) =
+ split /\//, $p, 4;
+ unless (defined $path_info) {$path_info = ""};
+ print $fh_w &generate('static', '', $p, $flavour, $content_type);
+ }