feat: implement structured data support for blog and page components, enhancing SEO and user experience through JSON-LD integration

This commit is contained in:
Ümit Tunç
2026-05-21 21:54:12 +03:00
parent 8675325f50
commit 6d9ffc808b
15 changed files with 509 additions and 176 deletions
-30
View File
@@ -405,34 +405,4 @@
</div>
<!-- /.container -->
</section>
@push('scripts')
<script type="application/ld+json">
{
"@@context": "https://schema.org",
"@type": "BlogPosting",
"mainEntityOfPage": {
"@type": "WebPage",
"@id": "{{ route('blog.show', $post->slug) }}"
},
"headline": "{{ method_exists($post, 'translate') ? $post->translate('title') : $post->title }}",
"description": "{{ method_exists($post, 'translate') ? $post->translate('excerpt') : ($post->excerpt ?? '') }}",
"image": "{{ $post->featured_image_url ? $post->featured_image_url : asset('assets/img/logo.png') }}",
"author": {
"@type": "Person",
"name": "{{ $post->author->name ?? 'Trunçgil Teknoloji Editörü' }}"
},
"publisher": {
"@type": "Organization",
"name": "{{ setting('site_name', 'Trunçgil Teknoloji') }}",
"logo": {
"@type": "ImageObject",
"url": "{{ asset('storage/' . setting('site_logo')) }}"
}
},
"datePublished": "{{ $post->published_at ? $post->published_at->toIso8601String() : $post->created_at->toIso8601String() }}",
"dateModified": "{{ $post->updated_at->toIso8601String() }}"
}
</script>
@endpush
@endsection