@php $fm = $post['frontmatter'] ?? []; $isLegacy = $legacy ?? false; $canonicalUrl = url('/blog/' . ($post['slug'] ?? '')); $rawMdUrl = url('/blog/' . ($post['slug'] ?? '') . '.md'); $ogImage = $fm['og_image'] ?? $fm['featured_image'] ?? null; if ($ogImage && !Str::startsWith($ogImage, 'http')) { $ogImage = asset(ltrim($ogImage, '/')); } $seo = [ 'title' => ($fm['title'] ?? 'Post') . ' · GE-AS Blog', 'description' => $fm['excerpt'] ?? '', 'robots' => ($fm['noindex'] ?? false) ? 'noindex, follow' : 'index, follow', 'canonical' => $fm['canonical'] ?? $canonicalUrl, 'og_type' => 'article', 'og_image' => $ogImage, 'extra_head' => '', 'json_ld' => [ '@context' => 'https://schema.org', '@type' => 'BlogPosting', 'headline' => $fm['title'] ?? '', 'description' => $fm['excerpt'] ?? '', 'image' => $ogImage ? [$ogImage] : [], 'datePublished' => !empty($fm['published_at']) ? \Carbon\Carbon::parse($fm['published_at'])->toIso8601String() : null, 'dateModified' => !empty($fm['updated_at']) ? \Carbon\Carbon::parse($fm['updated_at'])->toIso8601String() : (!empty($fm['published_at']) ? \Carbon\Carbon::parse($fm['published_at'])->toIso8601String() : null), 'author' => [ '@type' => 'Person', 'name' => $post['author']['display_name'] ?? 'GE-AS Team', ], 'publisher' => [ '@type' => 'Organization', 'name' => 'GE-AS', 'url' => url('/'), 'logo' => [ '@type' => 'ImageObject', 'url' => asset('new-assets/logo.svg'), ], ], 'mainEntityOfPage' => [ '@type' => 'WebPage', '@id' => $canonicalUrl, ], 'keywords' => $fm['keywords'] ?? [], ], ]; @endphp @extends('layouts.user') @section('content') {{-- HERO --}} @include('blog.partials.hero', ['post' => $post]) {{-- BREADCRUMBS --}}
{{-- ARTICLE + TOC LAYOUT --}}