| 1 | package Rhetoric::Meta; | ||
| 2 | use common::sense; | ||
| 3 | use aliased 'Squatting::H'; | ||
| 4 | use Method::Signatures::Simple; | ||
| 5 | use File::Find::Rule; | ||
| 6 | |||
| 7 | # blog metadata and menus will always be in the filesystem | ||
| 8 | our $meta = H->new({ | ||
| 9 | |||
| 10 | pages => method { | ||
| 11 | my $base = $self->base; | ||
| 12 | my $path = "$base/pages"; | ||
| 13 | my @pages = | ||
| 14 | map { s/$path\///; s/\.html$//; $_ } | ||
| 15 | File::Find::Rule ->file() ->in($path); | ||
| 16 | } | ||
| 17 | |||
| 18 | }); | ||
| 19 | |||
| 20 | 1; |