forked from laysense/laysense.cn
Enable in-place editing for page sections and media
This commit is contained in:
@@ -28,7 +28,7 @@ final class SiteController
|
||||
return $this->renderPage($repo, $page);
|
||||
}
|
||||
|
||||
public function renderPage(Repository $repo, array $page, bool $preview = false): Response
|
||||
public function renderPage(Repository $repo, array $page, bool $preview = false, bool $canvas = false): Response
|
||||
{
|
||||
$slug = $page['slug'];
|
||||
$isHome = $slug === 'home';
|
||||
@@ -42,7 +42,7 @@ final class SiteController
|
||||
'socialImage' => $page['image'],
|
||||
'socialAlt' => $page['alt'],
|
||||
'articles' => $isHome ? $repo->articles(limit: 3) : [],
|
||||
'previewMode' => $preview, 'noindex' => $preview,
|
||||
'previewMode' => $preview, 'canvas' => $preview && $canvas, 'noindex' => $preview,
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user