🛠️ Enhance SEO: Add meta tags for services and meetups landing pages, including dynamic title, description, and image handling

This commit is contained in:
HolgerHatGarKeineNode
2025-12-07 05:14:52 +01:00
parent 95de6e96c9
commit 0750852f51
4 changed files with 53 additions and 15 deletions

View File

@@ -4,8 +4,8 @@ use App\Attributes\SeoDataAttribute;
use App\Models\Meetup;
use App\Models\MeetupEvent;
use App\Traits\SeoTrait;
use Livewire\Volt\Component;
use Flux\Flux;
use Livewire\Volt\Component;
new
#[SeoDataAttribute(key: 'meetups_landingpage')]
@@ -44,6 +44,16 @@ class extends Component {
}
}; ?>
@section('meta')
@php
$SEOData = SeoDataAttribute::getData('meetups_landingpage');
$SEOData->title = $this->meetup->name;
$SEOData->description = $this->meetup->intro ? str($this->meetup->intro)->limit(50) : $SEOData->description;
$SEOData->image = $this->meetup->getFirstMediaUrl('logo');
@endphp
{!! seo($SEOData)->render() !!}
@endsection
<div class="container mx-auto px-4 py-8">
<div class="grid grid-cols-1 lg:grid-cols-2 gap-8">
<!-- Left Column: Meetup Details -->