SEO: canonical, sitemap.xml, robots.txt, JSON-LD, noindex admin

This commit is contained in:
Cedric Abonnel
2026-05-12 01:19:38 +02:00
parent ca6fcefe51
commit 3a5ae2631d
7 changed files with 139 additions and 3 deletions
+6 -1
View File
@@ -7,7 +7,8 @@
<!-- SEO -->
<meta name="description" content="<?= htmlspecialchars(($seoDescription ?? '') ?: 'Varlog est un journal personnel en ligne de Cédrix. Informatique, hack et loisirs techniques.') ?>">
<meta name="robots" content="index, follow">
<meta name="robots" content="<?= htmlspecialchars($metaRobots ?? 'index, follow') ?>">
<link rel="canonical" href="<?= htmlspecialchars($canonical ?? $ogUrl ?? rtrim(APP_URL, '/') . '/') ?>">
<!-- Open Graph -->
<meta property="og:title" content="<?= htmlspecialchars(($seoTitle ?? '') ?: ($title ?? 'varlog')) ?>">
@@ -25,6 +26,10 @@
<meta property="article:published_time" content="<?= htmlspecialchars(date('c', strtotime((string)$articlePublishedAt))) ?>">
<?php endif; ?>
<?php if (!empty($jsonLd ?? '')): ?>
<script type="application/ld+json"><?= $jsonLd ?></script>
<?php endif; ?>
<!-- RSS autodiscovery -->
<link rel="alternate" type="application/rss+xml" title="varlog" href="/feed">