@php
$seoTitle = $title ?? 'Vortex Sky X Wiki';
$seoDescription = trim((string) ($description ?? ''));
$seoGame = trim((string) ($game ?? ''));
$fallbackGames = 'Twelve Sky 1 and Twelve Sky 2';
if ($seoGame !== '' && stripos($seoTitle, $seoGame) === false) {
$seoTitle .= ' • ' . $seoGame;
}
if ($seoDescription === '') {
$seoDescription = 'Vortex Sky X Wiki database for Twelve Sky with items, skills, maps, monsters, and NPCs.';
}
if ($seoGame !== '' && stripos($seoDescription, $seoGame) === false) {
$seoDescription = rtrim($seoDescription, '.') . '. ' . $seoGame . '.';
} elseif ($seoGame === '' && stripos($seoDescription, 'Twelve Sky') === false) {
$seoDescription = rtrim($seoDescription, '.') . '. ' . $fallbackGames . '.';
}
$seoDescription = \Illuminate\Support\Str::limit($seoDescription, 160, '…');
$seoImage = $image ?? asset('images/WebLogo.png');
$seoUrl = $url ?? request()->fullUrl();
$seoCanonical = $canonical ?? request()->url();
$seoType = $type ?? 'website';
$seoRobots = $robots ?? 'index, follow, max-image-preview:large, max-snippet:-1, max-video-preview:-1';
$siteUrl = url('/');
$seoKeywords = $seoGame !== ''
? 'Twelve Sky, Twelve Sky 1, Twelve Sky 2, ' . $seoGame . ', Vortex Sky X Wiki'
: 'Twelve Sky, Twelve Sky 1, Twelve Sky 2, Vortex Sky X Wiki';
$aboutGames = $seoGame !== '' ? [$seoGame] : ['Twelve Sky 1', 'Twelve Sky 2'];
@endphp