Back-to-top-Button: erscheint nach 1,5 Viewporthöhen, Fokus-Management, reduced-motion, 48px-Ziel
Enthält auch User-Upgrade: JSON-LD als @graph mit seitenspezifischen Extra-Knoten Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -3,13 +3,19 @@
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* SportsClub-Schema aus data/club.json — auf jeder Seite identisch (NAP-Konsistenz für SEO/GEO).
|
||||
* JSON-LD als ein @graph. Der SportsClub-Knoten (aus data/club.json) ist auf jeder
|
||||
* Seite identisch (NAP-Konsistenz für SEO/GEO) und hat eine feste @id, auf die
|
||||
* seitenspezifische Knoten verweisen.
|
||||
* Props:
|
||||
* $extra array — zusätzliche Graph-Knoten der Seite (z. B. SportsTeam, FAQPage,
|
||||
* BreadcrumbList), gebaut via team_schema()/page_schema().
|
||||
*/
|
||||
$club = json_load('club');
|
||||
$clubId = abs_url() . '#club';
|
||||
|
||||
$schema = [
|
||||
'@context' => 'https://schema.org',
|
||||
$clubNode = [
|
||||
'@type' => 'SportsClub',
|
||||
'@id' => $clubId,
|
||||
'name' => $club['name'],
|
||||
'alternateName' => $club['legal_name'],
|
||||
'foundingDate' => $club['founded'],
|
||||
@@ -27,5 +33,10 @@ $schema = [
|
||||
],
|
||||
'sameAs' => array_values(array_filter($club['social'])),
|
||||
];
|
||||
|
||||
$graph = [
|
||||
'@context' => 'https://schema.org',
|
||||
'@graph' => array_merge([$clubNode], $extra ?? []),
|
||||
];
|
||||
?>
|
||||
<script type="application/ld+json"><?= json_encode($schema, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE) ?></script>
|
||||
<script type="application/ld+json"><?= json_encode($graph, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE) ?></script>
|
||||
|
||||
Reference in New Issue
Block a user