@if (isset($site) && $site->favicon) @endif @if (isset($site) && $site->discourage_search) @endif {{-- Other meta tags --}} {{-- --}} {{-- Schema.org JSON --}} {{-- --}} @php if (!isset($componentable)) { $componentable = $post ?? $taxonomy ?? null; // Get page data object into one variable } $metas = $componentable ? $componentable->getRawMeta() : null; // Get all meta tag variables for this page $site_name = \App\Site::first()->title ?? config('env.APP_NAME'); // Get site name, from database first, otherwise from env $title = $custom_title ?? $metas->title ?? $componentable->title ?? $product->name ?? (isset($exception) && !empty($exception->getStatusCode()) ? 'Page Not Found' : null); // Get page title, or set title as Page Not Found $author = $metas->author ?? $site_name; // Get page author, defaults to site name $description = $metas->description ?? getPostExcerpt($componentable ?? $product->short_description ?? null, 30); // Get page description, either from meta, from product data, or from page content $og_image = $componentable->og_image ?? $componentable->featured_image ?? $product->image ?? null; // Get an image to use as OG image $og_image_alt = $componentable->alt_text ?? $og_image->alt ?? ($product->name ?? null ? 'Image for '.$product->image : null) ?? ($title ? 'Image for '.$title : null) ?? null; // Get alt text for image, otherwise create from product, or page title $og_title = $metas->og_title ?? $title; // Get OG title, defaults to page title $og_description = $metas->og_description ?? $description; // Get OG description, defaults to page description $twitter_title = $metas->twitter_title ?? $title; // Get Twitter title, defaults to page title $twitter_description = $metas->twitter_description ?? $description; // Get Twitter description, defaults to page description $keywords = ''; if (!empty($product)) { $brand = $product->brand ?? null; $name = $product->name; $keywords = ($brand ? $brand.', ' : ''). ($brand ? $brand.' '.$name.', ' : $name.', '). ($brand ? $brand.' fabric, ' : ''). ($brand ? $brand.' '.$name.' fabric, ' : $name.' fabric, '). ($brand ? 'buy '.$brand.' fabric, ' : ''). (($brand ? 'buy '.$brand.' '.$name.' fabric' : 'buy '.$name.' fabric')) ; } @endphp {{ $title }} @if ($og_image) @endif