feat: meta author + site_author configurable depuis /admin/site

This commit is contained in:
Cedric Abonnel
2026-05-12 23:40:21 +02:00
parent fb14d7c842
commit 6b32eccebe
4 changed files with 25 additions and 3 deletions
+5 -2
View File
@@ -281,6 +281,9 @@ if ($ogImage === null || $ogImage === '') {
$ogImage = $article['og_image'] ?? '';
}
// Auteur : nom affiché de l'article, sinon auteur du site
$metaAuthor = $authorName !== '' ? $authorName : siteAuthor();
// JSON-LD Article
$jsonLdData = [
'@context' => 'https://schema.org',
@@ -290,10 +293,10 @@ $jsonLdData = [
'url' => $canonical,
'datePublished' => date('c', strtotime((string)$articlePublishedAt)),
'dateModified' => date('c', strtotime((string)($article['updated_at'] ?? $articlePublishedAt))),
'author' => ['@type' => 'Person', 'name' => 'Cédrix'],
'author' => ['@type' => 'Person', 'name' => $metaAuthor !== '' ? $metaAuthor : siteTitle()],
'publisher' => [
'@type' => 'Person',
'name' => 'Cédrix',
'name' => siteAuthor() !== '' ? siteAuthor() : siteTitle(),
'url' => rtrim(APP_URL, '/'),
],
'inLanguage' => 'fr-FR',