feat: add SEO meta tags, Open Graph, Twitter Cards, JSON-LD schema, sitemap, robots.txt
This commit is contained in:
@@ -3,9 +3,11 @@ $notifications = $notifications ?? [];
|
||||
$unreadCount = $unreadCount ?? 0;
|
||||
$teamId = $teamId ?? null;
|
||||
$title = $title ?? 'ServerManager';
|
||||
$description = $description ?? 'ServerManager — Linux server management platform. Monitor, manage, and control your servers from anywhere with real-time metrics, web terminal, and push notifications.';
|
||||
$content = $content ?? '';
|
||||
|
||||
$currentRoute = $_SERVER['REQUEST_URI'] ?? '/';
|
||||
$canonicalUrl = ($_ENV['APP_URL'] ?? 'https://sysadmin.lan') . $currentRoute;
|
||||
|
||||
if (!isset($user) || $user === null) {
|
||||
$user = auth();
|
||||
@@ -17,8 +19,47 @@ if (!isset($user) || $user === null) {
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title><?= htmlspecialchars($title) ?> — ServerManager</title>
|
||||
<meta name="description" content="<?= htmlspecialchars($description) ?>">
|
||||
<meta name="api-token" content="<?= htmlspecialchars($user['api_token'] ?? '') ?>">
|
||||
<meta name="csrf-token" content="<?= $this->csrfToken() ?>">
|
||||
|
||||
<!-- Canonical -->
|
||||
<link rel="canonical" href="<?= htmlspecialchars($canonicalUrl) ?>">
|
||||
|
||||
<!-- Open Graph -->
|
||||
<meta property="og:title" content="<?= htmlspecialchars($title) ?> — ServerManager">
|
||||
<meta property="og:description" content="<?= htmlspecialchars($description) ?>">
|
||||
<meta property="og:type" content="website">
|
||||
<meta property="og:url" content="<?= htmlspecialchars($canonicalUrl) ?>">
|
||||
<meta property="og:image" content="<?= htmlspecialchars(($_ENV['APP_URL'] ?? 'https://sysadmin.lan') . '/assets/img/icon-512.png') ?>">
|
||||
<meta property="og:site_name" content="ServerManager">
|
||||
<meta property="og:locale" content="en_US">
|
||||
|
||||
<!-- Twitter Card -->
|
||||
<meta name="twitter:card" content="summary_large_image">
|
||||
<meta name="twitter:title" content="<?= htmlspecialchars($title) ?> — ServerManager">
|
||||
<meta name="twitter:description" content="<?= htmlspecialchars($description) ?>">
|
||||
<meta name="twitter:image" content="<?= htmlspecialchars(($_ENV['APP_URL'] ?? 'https://sysadmin.lan') . '/assets/img/icon-512.png') ?>">
|
||||
|
||||
<!-- JSON-LD Schema -->
|
||||
<script type="application/ld+json">
|
||||
{
|
||||
"@context": "https://schema.org",
|
||||
"@type": "WebApplication",
|
||||
"name": "ServerManager",
|
||||
"url": "<?= htmlspecialchars($_ENV['APP_URL'] ?? 'https://sysadmin.lan') ?>",
|
||||
"description": "Linux server management platform with real-time monitoring, web terminal, and push notifications.",
|
||||
"applicationCategory": "DeveloperApplication",
|
||||
"operatingSystem": "Linux",
|
||||
"browserRequirements": "Requires JavaScript. Supports Chrome, Firefox, Safari, Edge.",
|
||||
"offers": {
|
||||
"@type": "Offer",
|
||||
"price": "0",
|
||||
"priceCurrency": "USD"
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<link rel="stylesheet" href="/assets/css/style.css?v=<?= asset_version() ?>">
|
||||
<link rel="icon" type="image/svg+xml" href="/assets/img/server.svg">
|
||||
<link rel="manifest" href="/manifest.json">
|
||||
|
||||
Reference in New Issue
Block a user