Expand page templates and configure page visibility
This commit is contained in:
@@ -41,6 +41,7 @@ final class SiteController
|
||||
{
|
||||
$slug = $page['slug'];
|
||||
$isHome = $slug === 'home';
|
||||
$showHero = $page['visibility']['hero'] ?? true;
|
||||
$categories = $repo->categories();
|
||||
foreach ($page['sections'] as &$section) {
|
||||
if (!$section['feed']) {
|
||||
@@ -75,8 +76,8 @@ final class SiteController
|
||||
'path' => $isHome ? '/' : '/' . $slug,
|
||||
'title' => $page['title'],
|
||||
'description' => $page['description'],
|
||||
'socialImage' => $page['image'],
|
||||
'socialAlt' => $page['alt'],
|
||||
'socialImage' => $showHero ? $page['image'] : '',
|
||||
'socialAlt' => $showHero ? $page['alt'] : '',
|
||||
'previewMode' => $preview, 'canvas' => $preview && $canvas, 'noindex' => $preview,
|
||||
]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user