fix #69
This commit is contained in:
parent
bff0f8eda3
commit
cb1f842fc9
4 changed files with 53 additions and 14 deletions
|
|
@ -8,6 +8,7 @@ function getFileData($file) {
|
|||
'quality' => 80,
|
||||
'format' => 'webp'
|
||||
])->url(),
|
||||
'source' => $file->url(),
|
||||
'parent' => [
|
||||
"title" => (string) $file->parent()->title(),
|
||||
"uri" => $file->parent()->uri()
|
||||
|
|
@ -28,10 +29,10 @@ function getFileData($file) {
|
|||
$data['tags'] = $file->tags()->split();
|
||||
};
|
||||
|
||||
if($file->comments()->exists()) {
|
||||
if ($file->comments()->exists()) {
|
||||
$data['comments'] = $file->comments()->exists() && $file->comments() ? Data::decode($file->comments()->value(), 'yaml') : [];
|
||||
$data['cover'] = $file->cover()->exists() && $file->cover()->isNotEmpty() ? $file->cover()->toFile()->resize(576)->url() : false;
|
||||
}
|
||||
}
|
||||
|
||||
return $data;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue