feat: meta author + site_author configurable depuis /admin/site
This commit is contained in:
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user