package SCSite::Page;
use IO::All;
+use Time::Local qw(timelocal);
use Moo;
-has $_ => (is => 'ro') for qw(title description keywords body created path);
+has $_ => (is => 'ro') for qw(
+ title subtitle description keywords body created path
+);
+
+sub published_at {
+ $_[0]->created
+ ? scalar localtime timelocal
+ map +(@{$_}[0..3], $_->[4]-1, $_->[5]-1900),
+ [ reverse split '\D+', $_[0]->created ]
+ : ''
+}
has "_$_" => (is => 'ro', init_arg => $_) for qw(page_set);