public function handle($file, $data)
{
list($frontMatter, $content) = $this->parser->parse($file->getContents());
$items = $data['site'][$frontMatter['pagination']['for']];
$perPage = array_get($frontMatter, 'pagination.perPage', 10);
$pages = $this->paginator->paginate($file, $items, $perPage);
return $pages->map(function ($page) use($file, $data, $content) {
return new OutputFile($file->getRelativePath(), $file->getBasename('.blade.php'), 'html', $this->render($content, array_merge($data, ['pagination' => $page])), $data, $page['page']);
})->all();
}