optimizations

This commit is contained in:
2026-03-28 19:15:39 +01:00
parent 0b25d9570a
commit cab4fbd83e
509 changed files with 1016804 additions and 1605 deletions

View File

@@ -47,6 +47,34 @@
], JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE) !!}
</script>
@endif
@if(($gallery_type ?? null) === 'tag' && !empty($tag_context))
<script type="application/ld+json">
{!! json_encode([
'@context' => 'https://schema.org',
'@type' => 'CollectionPage',
'name' => $page_title ?? ($hero_title ?? ('#' . ($tag_context['name'] ?? 'Tag'))),
'description' => $page_meta_description ?? ($hero_description ?? null),
'url' => $page_canonical ?? $seoUrl($seoPage),
'mainEntity' => [
'@type' => 'ItemList',
'numberOfItems' => method_exists($artworks, 'total') ? $artworks->total() : count($artworks ?? []),
'itemListElement' => collect(method_exists($artworks, 'getCollection') ? $artworks->getCollection() : ($artworks ?? []))
->take(12)
->values()
->map(fn ($artwork, $index) => [
'@type' => 'ListItem',
'position' => $index + 1,
'url' => !empty($artwork->slug) ? url('/' . $artwork->slug) : null,
'name' => $artwork->name ?? null,
])
->filter(fn (array $item) => filled($item['url']) || filled($item['name']))
->values()
->all(),
],
], JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE) !!}
</script>
@endif
@endpush
@php