@extends('layouts.admin') @section('title', 'Detail SEO Halaman') @section('content')

Detail SEO Halaman

Pengaturan SEO untuk halaman {{ ucfirst($pageSeo->page_identifier) }}

Informasi Dasar SEO

Halaman
{{ ucfirst($pageSeo->page_identifier) }}
Status
@if($pageSeo->is_active) Aktif @else Nonaktif @endif
Meta Title
{{ $pageSeo->title ?: 'Tidak ada title' }} @if($pageSeo->title) ({{ strlen($pageSeo->title) }} karakter) @endif
Meta Description
{{ $pageSeo->description ?: 'Tidak ada description' }} @if($pageSeo->description) ({{ strlen($pageSeo->description) }} karakter) @endif
Keywords
@if($pageSeo->keywords)
@foreach(explode(',', $pageSeo->keywords) as $keyword) {{ trim($keyword) }} @endforeach
@else Tidak ada keywords @endif

Open Graph (Facebook)

OG Title
{{ $pageSeo->og_title ?: 'Tidak diatur' }}
OG Description
{{ $pageSeo->og_description ?: 'Tidak diatur' }}
OG Image
@if($pageSeo->og_image) OG Image @else Tidak ada gambar @endif

Twitter Card

Twitter Title
{{ $pageSeo->twitter_title ?: 'Tidak diatur' }}
Twitter Description
{{ $pageSeo->twitter_description ?: 'Tidak diatur' }}
Twitter Image
@if($pageSeo->twitter_image) Twitter Image @else Tidak ada gambar @endif
@if($pageSeo->schema_markup)

Schema Markup

{{ $pageSeo->schema_markup }}
@endif

Informasi Waktu

Dibuat
{{ $pageSeo->created_at->format('d M Y H:i') }}
Terakhir Diupdate
{{ $pageSeo->updated_at->format('d M Y H:i') }}

Preview SEO

Preview Google

{{ $pageSeo->title ?: 'Meta Title' }}
{{ url('/') }}/{{ $pageSeo->page_identifier }}
{{ $pageSeo->description ?: 'Meta description tidak tersedia' }}

Preview Facebook

@if($pageSeo->og_image) OG Image @else @endif
{{ $pageSeo->og_title ?: $pageSeo->title ?: 'OG Title' }}
{{ Str::limit($pageSeo->og_description ?: $pageSeo->description ?: 'OG Description tidak tersedia', 100) }}
{{ parse_url(url('/'), PHP_URL_HOST) }}

Preview Twitter

@if($pageSeo->twitter_image) Twitter Image @else @endif
{{ $pageSeo->twitter_title ?: $pageSeo->title ?: 'Twitter Title' }}
{{ Str::limit($pageSeo->twitter_description ?: $pageSeo->description ?: 'Twitter description tidak tersedia', 100) }}
{{ parse_url(url('/'), PHP_URL_HOST) }}

Skor SEO

@php $score = 0; $total = 0; $checks = [ ['condition' => !empty($pageSeo->title), 'label' => 'Meta Title', 'points' => 20], ['condition' => !empty($pageSeo->description), 'label' => 'Meta Description', 'points' => 20], ['condition' => !empty($pageSeo->keywords), 'label' => 'Keywords', 'points' => 15], ['condition' => !empty($pageSeo->og_title), 'label' => 'OG Title', 'points' => 15], ['condition' => !empty($pageSeo->og_description), 'label' => 'OG Description', 'points' => 15], ['condition' => !empty($pageSeo->og_image), 'label' => 'OG Image', 'points' => 15] ]; foreach($checks as $check) { $total += $check['points']; if($check['condition']) { $score += $check['points']; } } $percentage = $total > 0 ? round(($score / $total) * 100) : 0; @endphp
{{ $percentage }}%
Skor SEO
@foreach($checks as $check)
{{ $check['label'] }} @if($check['condition']) @else @endif
@endforeach
@if($percentage < 80)
Saran: Lengkapi semua field SEO untuk meningkatkan skor.
@endif

Aksi Cepat

Edit SEO
@push('scripts') @endpush @endsection