@php
$storefront = ($entry ?? 'storefront') === 'storefront';
$seo = \App\Modules\Seo\Support\SeoTags::build(request(), [
'title' => $title ?? null,
'description' => $description ?? null,
'keywords' => $keywords ?? null,
'image' => $image ?? null,
'type' => $type ?? null,
'canonical' => $canonical ?? null,
'noindex' => $noindex ?? false,
'schema' => $schema ?? [],
'breadcrumbs' => $breadcrumbs ?? [],
'paginator' => $paginator ?? null,
'product' => $product ?? null,
], $storefront);
$favicon = settings('branding.favicon');
$tracking = $storefront && ! request()->routeIs('account.*');
@endphp
{{ $seo['title'] }}
@if ($seo['description'])@endif
@if ($seo['keywords'] && $seo['indexable'])@endif
@if ($seo['indexable'])
@if ($seo['prev'])@endif
@if ($seo['next'])@endif
@endif
@if ($storefront)
{{-- Open Graph (Facebook, WhatsApp, LinkedIn) and X cards --}}
@if ($seo['description'])@endif
@if ($p = $seo['product'])
@endif
@if ($seo['description'])@endif
@if ($seo['twitter'])@endif
{{-- Search engine verification --}}
@if ($v = settings('seo.google_verification'))@endif
@if ($v = settings('seo.bing_verification'))@endif
@if ($v = settings('seo.pinterest_verification'))@endif
@if ($v = settings('seo.yandex_verification'))@endif
@if ($seo['jsonld'])@endif
@endif
@if (($entry ?? 'storefront') === 'storefront')
@unless ($favicon)@endunless
@endif
@if ($favicon)
@endif
@if ($tracking)
{{-- IDs are validated to strict formats in Settings > SEO, so they are safe to print in scripts. --}}
@if ($gtm = settings('seo.gtm_id'))
@elseif ($ga = settings('seo.ga4_id'))
@endif
@if ($px = settings('seo.fb_pixel_id'))
@endif
@endif
@php($assetVersion = fn (string $f) => asset("assets/{$f}").'?v='.(@filemtime(public_path("assets/{$f}")) ?: 1))
@if ($entry === 'storefront')@endif
@stack('styles')
@if ($entry === 'storefront')@endif