From 6d9ffc808b32e64a90f698e6a1ce84ca7d48b53a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=9Cmit=20Tun=C3=A7?= Date: Thu, 21 May 2026 21:54:12 +0300 Subject: [PATCH] feat: implement structured data support for blog and page components, enhancing SEO and user experience through JSON-LD integration --- .cursor/rules/structured-data.mdc | 85 +++++++++ app/Http/Controllers/BlogController.php | 10 + app/Http/Controllers/PageController.php | 17 +- app/Support/BlogStructuredData.php | 149 +++++++++++++++ app/Support/MusicProductionStructuredData.php | 174 ++++-------------- app/Support/PageStructuredData.php | 58 ++++++ app/Support/StructuredData.php | 149 +++++++++++++++ lang/en/blog.php | 2 + lang/en/pages.php | 1 + lang/tr/blog.php | 2 + lang/tr/pages.php | 1 + resources/views/blog/show.blade.php | 30 --- .../front/music-productions/index.blade.php | 2 - .../front/music-productions/show.blade.php | 2 - resources/views/layouts/site.blade.php | 3 + 15 files changed, 509 insertions(+), 176 deletions(-) create mode 100644 .cursor/rules/structured-data.mdc create mode 100644 app/Support/BlogStructuredData.php create mode 100644 app/Support/PageStructuredData.php create mode 100644 app/Support/StructuredData.php diff --git a/.cursor/rules/structured-data.mdc b/.cursor/rules/structured-data.mdc new file mode 100644 index 0000000..1fb8978 --- /dev/null +++ b/.cursor/rules/structured-data.mdc @@ -0,0 +1,85 @@ +--- +description: Google yapılandırılmış veri (JSON-LD) standartları +globs: app/Support/*StructuredData*.php, app/Http/Controllers/**/*.php, resources/views/**/*.blade.php +--- +# Yapılandırılmış Veri (Structured Data) Kuralları + +Google [Yapılandırılmış Veri Genel Yönergeleri](https://developers.google.com/search/docs/appearance/structured-data/sd-policies?hl=tr) ve [Giriş](https://developers.google.com/search/docs/appearance/structured-data/intro-structured-data?hl=tr) dokümanlarına uy. + +## Temel İlkeler + +1. **JSON-LD kullan** — Google'ın önerdiği format; `` içinde ` -@endpush @endsection diff --git a/resources/views/front/music-productions/index.blade.php b/resources/views/front/music-productions/index.blade.php index acf1fab..02406a3 100644 --- a/resources/views/front/music-productions/index.blade.php +++ b/resources/views/front/music-productions/index.blade.php @@ -1,7 +1,5 @@ @extends('layouts.site') - - @section('content') {{-- demo28.html: hero + itemgrid --}}
diff --git a/resources/views/front/music-productions/show.blade.php b/resources/views/front/music-productions/show.blade.php index 96f015d..9676057 100644 --- a/resources/views/front/music-productions/show.blade.php +++ b/resources/views/front/music-productions/show.blade.php @@ -1,7 +1,5 @@ @extends('layouts.site') - - @section('content')
diff --git a/resources/views/layouts/site.blade.php b/resources/views/layouts/site.blade.php index 3a584c1..0de0a51 100644 --- a/resources/views/layouts/site.blade.php +++ b/resources/views/layouts/site.blade.php @@ -51,6 +51,9 @@ $favicon_path = setting('site_favicon'); @endif + @if(!empty($structuredData)) + + @endif @stack('structured-data')