@props(['seo' => null]) @if ($seo) @php $ogTitle = data_get($seo, 'og.title', $seo->title ?? ''); $ogDescription = data_get($seo, 'og.description', $seo->description ?? ''); $ogUrl = data_get($seo, 'og.url', $seo->canonical ?? url()->current()); $ogType = data_get($seo, 'og.type', 'website'); $ogSiteName = data_get($seo, 'og.site_name', config('apex.name')); $ogImage = data_get($seo, 'og.image', $seo->og_image ?? null); $twitterCard = data_get($seo, 'twitter.card', 'summary_large_image'); $twitterTitle = data_get($seo, 'twitter.title', $ogTitle); $twitterDescription = data_get($seo, 'twitter.description', $ogDescription); $twitterImage = data_get($seo, 'twitter.image', $ogImage); @endphp @if ($ogImage) @endif @if ($twitterImage) @endif @if ($ogType === 'article' && !empty($seo->article)) @php $article = $seo->article; @endphp @if (!empty($article->published_time)) @endif @if (!empty($article->modified_time)) @endif @if (!empty($article->author)) @endif @if (!empty($article->section)) @endif @foreach ($article->tags ?? [] as $tag) @endforeach @endif @endif