@extends('news.layout', [
'metaTitle' => config('news.rss_title', 'News'),
'metaDescription' => config('news.rss_description', ''),
'metaCanonical' => route('news.index'),
])
@section('news_content')
@php
$articleItems = collect([$featured])
->merge($highlights)
->merge($articles->items())
->filter(fn ($article) => $article !== null)
->unique('id')
->values();
$headerBreadcrumbs = collect([
(object) ['name' => 'News', 'url' => route('news.index')],
]);
$structuredData = [
[
'@context' => 'https://schema.org',
'@type' => 'CollectionPage',
'name' => config('news.rss_title', 'News'),
'description' => config('news.rss_description', 'Latest news, feature rollouts, and team updates from Skinbase.'),
'url' => route('news.index'),
],
];
if ($articleItems->isNotEmpty()) {
$structuredData[] = [
'@context' => 'https://schema.org',
'@type' => 'ItemList',
'name' => config('news.rss_title', 'News') . ' Articles',
'description' => config('news.rss_description', 'Latest news, feature rollouts, and team updates from Skinbase.'),
'url' => route('news.index'),
'numberOfItems' => $articleItems->count(),
'itemListElement' => $articleItems->map(fn ($article, int $index): array => [
'@type' => 'ListItem',
'position' => $index + 1,
'name' => $article->title,
'url' => route('news.show', $article->slug),
])->all(),
];
}
$seo = \App\Support\Seo\SeoDataBuilder::fromArray([
'title' => config('news.rss_title', 'News'),
'description' => config('news.rss_description', 'Latest news, feature rollouts, and team updates from Skinbase.'),
'canonical' => route('news.index'),
'breadcrumbs' => $headerBreadcrumbs,
'structured_data' => $structuredData,
])->build();
@endphp
{{ Str::limit(strip_tags((string) $featured->excerpt), 220) }}
@endif