Remove silly DOCTYPE
[scpubgit/App-SCS.git] / lib / App / SCS / Plugin / Core / PagePlugin / PageData.pm
CommitLineData
632f0e07 1package App::SCS::Plugin::Core::PagePlugin::PageData;
2
3use Moo;
4
5with 'App::SCS::Role::PagePlugin';
6
7sub filter_content_zoom {
8 my ($self, $zoom) = @_;
9 my $page = $self->page;
10 $zoom->select('.page.title')->replace_content($page->title)
11 ->select('.page.subtitle')->${\sub {
12 $page->subtitle
13 ? $_[0]->replace_content($page->subtitle)
14 : $_[0]->replace('')
15 }}
16 ->select('.page.published_at')->replace_content($page->published_at)
17 ->select('meta[name=description]')
18 ->set_attribute(content => $page->description)
19 ->select('meta[name=keywords]')
20 ->set_attribute(content => $page->keywords)
21 ->select('meta[name=created]')
22 ->set_attribute(content => $page->created);
23}
24
251;