feat: implement structured data support for blog and page components, enhancing SEO and user experience through JSON-LD integration
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
@extends('layouts.site')
|
||||
|
||||
<x-seo.json-ld :data="$structuredData ?? null" />
|
||||
|
||||
@section('content')
|
||||
{{-- demo28.html: hero + itemgrid --}}
|
||||
<section class="wrapper bg-gradient-blend">
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
@extends('layouts.site')
|
||||
|
||||
<x-seo.json-ld :data="$structuredData ?? null" />
|
||||
|
||||
@section('content')
|
||||
<section class="wrapper !bg-[#edf2fc]">
|
||||
<div class="container pt-10 pb-36 xl:pt-[4.5rem] lg:pt-[4.5rem] md:pt-[4.5rem] xl:pb-60 lg:pb-60 md:pb-60 !text-center">
|
||||
|
||||
@@ -51,6 +51,9 @@ $favicon_path = setting('site_favicon');
|
||||
<meta name="twitter:image:alt" content="{{ $meta['image_alt'] ?? $seo_title }}">
|
||||
@endif
|
||||
|
||||
@if(!empty($structuredData))
|
||||
<x-seo.json-ld :data="$structuredData" />
|
||||
@endif
|
||||
@stack('structured-data')
|
||||
|
||||
<link rel="icon" href="{{ $favicon_path ? (str_starts_with($favicon_path, 'http') ? $favicon_path : asset($favicon_path)) : asset('assets/img/favicon.png') }}">
|
||||
|
||||
Reference in New Issue
Block a user