@props([ 'article', 'showImage' => true, 'showMeta' => true, 'showExcerpt' => true, 'imageSize' => 'medium' // small, medium, large ]) @php use Illuminate\Support\Str; $imageClasses = [ 'small' => 'w-full h-32 object-cover', 'medium' => 'w-full h-48 object-cover', 'large' => 'w-full h-64 object-cover', ]; $excerpt = $article->excerpt ?? Str::limit(strip_tags($article->content), 150); $url = route('articles.show', $article->slug); $categoryUrl = $article->category ? route('categories.show', $article->category->slug) : '#'; $readingTime = max(1, ceil(str_word_count(strip_tags($article->content ?? '')) / 200)); @endphp
@if($showImage && $article->featured_image) {{ $article->title }} @endif
@if($showMeta && $article->category)
{{ $article->category->name }} {{ $readingTime }} menit baca
@endif

{{ $article->title }}

@if($showExcerpt)

{{ $excerpt }}

@endif @if($article->author) @endif
{{-- Hidden structured data --}} @if($article->updated_at) @endif