From 0882a21997b0830f43643cac9f0de4beaa698988 Mon Sep 17 00:00:00 2001 From: Serghei Iakovlev Date: Sun, 29 Sep 2024 15:54:01 +0200 Subject: Rework author configuration --- layouts/partials/schema.org/article.html | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) (limited to 'layouts/partials/schema.org/article.html') diff --git a/layouts/partials/schema.org/article.html b/layouts/partials/schema.org/article.html index f4112b6..1549784 100644 --- a/layouts/partials/schema.org/article.html +++ b/layouts/partials/schema.org/article.html @@ -13,7 +13,20 @@ {{- $logo := resources.Get (site.Params.assets.logo | default "/img/open-graph-logo.png") -}} {{- $logo = $logo.Resize "96x96" }} -{{- $siteAuthor := partial "site-author.html" . }} +{{- $siteAuthorName := "" }} +{{- $siteAuthorTwitter := "" }} +{{- with site.Params.author }} + {{- if reflect.IsMap . }} + {{- with .name }} + {{- $siteAuthorName = . }} + {{- end -}} + {{- with .twitter }} + {{- $siteAuthorTwitter = . }} + {{- end }} + {{- else }} + {{- $siteAuthorName = . }} + {{- end }} +{{- end }}