From a031ea960e13f8e4229ce31c111df3bbfff7892f Mon Sep 17 00:00:00 2001 From: Cedric Abonnel Date: Tue, 12 May 2026 23:41:19 +0200 Subject: [PATCH] fix: meta author depuis le champ author de l'article uniquement --- templates/post_view.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/templates/post_view.php b/templates/post_view.php index cd85ec9..4ec505a 100644 --- a/templates/post_view.php +++ b/templates/post_view.php @@ -281,8 +281,8 @@ if ($ogImage === null || $ogImage === '') { $ogImage = $article['og_image'] ?? ''; } -// Auteur : nom affiché de l'article, sinon auteur du site -$metaAuthor = $authorName !== '' ? $authorName : siteAuthor(); +// Auteur : nom affiché résolu depuis le champ author du JSON de l'article +$metaAuthor = $authorName; // JSON-LD Article $jsonLdData = [ @@ -293,7 +293,7 @@ $jsonLdData = [ 'url' => $canonical, 'datePublished' => date('c', strtotime((string)$articlePublishedAt)), 'dateModified' => date('c', strtotime((string)($article['updated_at'] ?? $articlePublishedAt))), - 'author' => ['@type' => 'Person', 'name' => $metaAuthor !== '' ? $metaAuthor : siteTitle()], + 'author' => ['@type' => 'Person', 'name' => $metaAuthor !== '' ? $metaAuthor : (siteAuthor() !== '' ? siteAuthor() : siteTitle())], 'publisher' => [ '@type' => 'Person', 'name' => siteAuthor() !== '' ? siteAuthor() : siteTitle(),