@props([ 'post' => null, 'meta' => [ 'title' => '', 'description' => '', 'keywords' => '', 'ogImage' => '', 'schemaType' => '', ], ]) @php $jsonImage = null; if ($post->heroImage !== null) { $jsonImage = [ '@type' => 'ImageObject', '@id' => $post->hero_image_url ?? '', 'url' => $post->hero_image_url ?? '', 'width' => 1200, 'height' => 800, 'caption' => $post->heroImage->alt_text ?? '', 'inLanguage' => 'en-US', ]; } $descriptionPost = Str::limit( trim(preg_replace('/\s+/', ' ', html_entity_decode(strip_tags($post->content), ENT_QUOTES, 'UTF-8'))), 160, ); if ($post->excerpt) { $descriptionPost = trim(preg_replace('/\s+/', ' ', $post->excerpt)); //Delete first space if exists $descriptionPost = ltrim($descriptionPost, '  '); } $firstCategory = $post->categories->first()->name; $slugCategory = $post->categories->first()->slug; $urlCategory = route('blog.categories.show', ['slug' => $slugCategory]); @endphp @if (file_exists(public_path('build/manifest.json')) || file_exists(public_path('hot'))) @vite(['resources/css/app.css', 'resources/js/post.js']) @endif merge(['class' => 'post-layout']) }}> {{-- With Background Image --}} @if ($post->heroImage !== null) @else @endif
{{-- Breadcrumb --}}
{{-- Content --}}
{{-- Heading --}}
{{-- Category Badge --}} @if ($post->categories && $post->categories->count() > 0)
@foreach ($post->categories as $index => $category) {{ $category->name }} @if ($index < $post->categories->count() - 1) @endif @endforeach
@endif {{-- Title --}}

{!! $post->title !!}

{{-- Excerpt/Description --}} @if ($post->excerpt)

{!! $post->excerpt !!}

@endif {{-- Author and Share Container --}}
{{-- Author and Date --}}
By {{ $post->author }} @if ($post->published_at) Posted on {{ $post->published_at->format('F d, Y') }} @endif

{{ $post->formatted_reading_time }}

{{-- Divider --}} {{-- Time Read --}} {{-- Divider --}}
{{-- Share Button --}}
{{ $slot }}
{{-- Aside --}}

Other readings that might interest you

{{-- Share Modal --}}