@extends('layouts.app') @section('meta_title', $post->meta_title ?: $post->title) @section('meta_description', $post->meta_description ?: $post->excerpt) @section('meta_keywords', $post->meta_keywords ?: $post->category->name) @section('canonical_url', url()->current()) @section('og_title', $post->og_title ?: $post->title) @section('og_description', $post->og_description ?: $post->excerpt) @section('og_image', $post->featured_image ? asset('storage/' . $post->featured_image) : asset('images/default-og.jpg')) @section('og_type', 'article') @section('twitter_title', $post->twitter_title ?: $post->title) @section('twitter_description', $post->twitter_description ?: $post->excerpt) @section('twitter_image', $post->featured_image ? asset('storage/' . $post->featured_image) : asset('images/default-twitter.jpg')) @push('structured_data') @endpush @section('content')
{{-- Breadcrumbs --}}
{{-- Table of Contents Sidebar --}}

Daftar Isi

{{-- Article Info --}}

Info Artikel

{{ $post->published_at->format('d M Y') }}
{{ $post->category->name }}
{{ str_word_count(strip_tags($post->content)) }} kata
{{ ceil(str_word_count(strip_tags($post->content)) / 200) }} menit baca
{{-- Share Buttons --}}

Bagikan Artikel

{{-- Main Content --}}
{{-- Featured Image --}} @if($post->featured_image)
{{ $post->title }}
@endif
{{-- Article Header --}}
{{ $post->category->name }} {{ str_word_count(strip_tags($post->content)) }} kata

{{ $post->title }}

@if($post->excerpt)

{{ $post->excerpt }}

@endif
{{-- Article Content --}}
{!! $post->content !!}
{{-- Tags --}} @if($post->tags->count() > 0)

Tags:

@foreach($post->tags as $tag) {{ $tag->name }} @endforeach
@endif
{{-- Related Posts --}} @if($relatedPosts->count() > 0)

Artikel Terkait

@foreach($relatedPosts as $relatedPost)
@if($relatedPost->featured_image)
{{ $relatedPost->title }}
@endif
{{ $relatedPost->category->name }}

{{ $relatedPost->title }}

{{ $relatedPost->excerpt }}

@endforeach
@endif
{{-- Table of Contents JavaScript --}} {{-- Custom CSS for line-clamp --}} @endsection