Wire admin studio SSR and search infrastructure

This commit is contained in:
2026-05-01 11:46:06 +02:00
parent 257b0dbef6
commit 18cea8b0f0
329 changed files with 197465 additions and 2741 deletions

View File

@@ -52,12 +52,15 @@ final class SeoFactory
$image = $thumbs['xl']['url'] ?? $thumbs['lg']['url'] ?? $thumbs['md']['url'] ?? null;
$keywords = $artwork->tags->pluck('name')->filter()->unique()->values()->all();
$imageWidth = $thumbs['xl']['width'] ?? $thumbs['lg']['width'] ?? null;
$imageHeight = $thumbs['xl']['height'] ?? $thumbs['lg']['height'] ?? null;
return SeoDataBuilder::make()
->title(sprintf('%s by %s — %s', $title, $authorName, config('seo.site_name', 'Skinbase')))
->description($description)
->keywords($keywords)
->canonical($canonical)
->og(type: 'article', image: $image)
->og(type: 'article', image: $image, imageAlt: sprintf('%s by %s', $title, $authorName), imageWidth: is_int($imageWidth) ? $imageWidth : null, imageHeight: is_int($imageHeight) ? $imageHeight : null)
->addJsonLd(array_filter([
'@context' => 'https://schema.org',
'@type' => 'ImageObject',
@@ -147,6 +150,17 @@ final class SeoFactory
->build();
}
public function simplePage(string $title, string $description, string $canonical, bool $indexable = true): SeoData
{
return SeoDataBuilder::make()
->title($title)
->description($description)
->canonical($canonical)
->indexable($indexable)
->og(type: 'website')
->build();
}
/**
* @param array<string, mixed> $data
* @return array<string, mixed>