{{-- Belt-and-suspenders for the X-Robots-Tag header: keep non-production environments out of search results even if a proxy strips it. --}} @unless(app()->environment('production')) @endunless @php($tenant = app(\App\Support\CurrentTenant::class)) @php($brand = $tenant->branding()) {{-- Per-page SEO payload attached by Seo::render() (public marketplace pages). Pages rendered with plain Inertia::render (admin, portals) fall back to the bare site/tenant name. --}} @php($seo = $seo ?? null) @php($siteName = \App\Support\Seo::siteName()) @php($metaDescription = $seo['description'] ?? ($tenant->check() && $brand && !empty($brand->tagline) ? $brand->tagline : null)) {{ $seo['title'] ?? $siteName }} @if (!empty($metaDescription)) @endif @if (!empty($seo['robots'])) @endif {{-- Social link previews (Facebook/LinkedIn/WhatsApp/X fetch these without running JS, so they must be server-rendered). --}} @if (!empty($metaDescription)) @endif @php($ogImage = $seo['image'] ?? ($tenant->check() ? ($brand->logo_url ?? null) : url(config('seo.organization.logo')))) @if (!empty($ogImage)) @endif {{-- Structured data: per-page blocks (Course, BreadcrumbList, …) plus the sitewide Organization/LocalBusiness card on the main site. --}} @foreach (($seo['json_ld'] ?? []) as $jsonLdBlock) {!! \App\Support\Seo::jsonLdScript($jsonLdBlock) !!} @endforeach @if ($organizationJsonLd = \App\Support\Seo::organization()) {!! \App\Support\Seo::jsonLdScript($organizationJsonLd) !!} @endif @if ($tenant->check() && $brand && !empty($brand->logo_url)) @else @endif {{-- Analytics tracker: production only, so dev/staging traffic isn't recorded. --}} @if (app()->environment('production')) @endif {{-- Google tag (gtag.js) — GA4, production only for the same reason. --}} @if (app()->environment('production')) @endif @routes @viteReactRefresh @vite(['resources/js/app.tsx', "resources/js/pages/{$page['component']}.tsx"]) @inertiaHead @inertia