SEO: canonical, sitemap.xml, robots.txt, JSON-LD, noindex admin
This commit is contained in:
@@ -90,4 +90,28 @@ ob_start();
|
||||
<?php
|
||||
$content = ob_get_clean();
|
||||
$title = 'varlog';
|
||||
|
||||
// Pages avec curseur = contenu non-canonique → noindex
|
||||
if (!empty($cursor)) {
|
||||
$metaRobots = 'noindex, follow';
|
||||
$canonical = rtrim(APP_URL, '/') . '/';
|
||||
} elseif ($filterCat !== '') {
|
||||
$canonical = rtrim(APP_URL, '/') . '/?' . http_build_query(['cat' => $filterCat]);
|
||||
} else {
|
||||
$canonical = rtrim(APP_URL, '/') . '/';
|
||||
}
|
||||
|
||||
// JSON-LD WebSite sur la page d'accueil sans filtre
|
||||
if (empty($cursor) && $filterCat === '') {
|
||||
$jsonLd = json_encode([
|
||||
'@context' => 'https://schema.org',
|
||||
'@type' => 'WebSite',
|
||||
'name' => 'varlog',
|
||||
'url' => rtrim(APP_URL, '/') . '/',
|
||||
'description' => 'Journal personnel de Cédrix. Informatique, hack et loisirs techniques.',
|
||||
'inLanguage' => 'fr-FR',
|
||||
'author' => ['@type' => 'Person', 'name' => 'Cédrix'],
|
||||
], JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE);
|
||||
}
|
||||
|
||||
include __DIR__ . '/layout.php';
|
||||
|
||||
Reference in New Issue
Block a user