diff --git a/_includes/author-profile.html b/_includes/author-profile.html index 12c5971bba0f6d518f41f8a84538960290820c3b..675075dcae645a412197e1b0bd2f7e8a3e6af789 100644 --- a/_includes/author-profile.html +++ b/_includes/author-profile.html @@ -1,7 +1,9 @@ <!-- {% assign author = page.author | default: page.authors[0] | default: site.author %} --> -{% assign author = page.url | split: "/" %} -{% assign author = author[1] %} -{% assign author = site.data.authors.authors | where: "prefix", author | first %} +{% unless page.author %} + {% assign author = page.url | split: "/" %} + {% assign author = author[1] %} +{% endunless %} +{% assign author = site.data.authors.authors | where: "directory", author | first %} <div itemscope itemtype="https://schema.org/Person"> diff --git a/_includes/seo.html b/_includes/seo.html index be95b29e8989a855f153ff443700a5a88f71767d..f4415d3730cbd7f1822c0b368ef8f41e5b274be9 100644 --- a/_includes/seo.html +++ b/_includes/seo.html @@ -25,6 +25,7 @@ {%- assign seo_description = seo_description | markdownify | strip_html | strip_newlines | escape_once -%} {%- endif -%} +<!-- don't use page.author even if it is set, find author based on url --> {% assign author = page.url | split: "/" %} {% assign author = author[1] %} {% assign author = site.data.authors.authors | where: "prefix", author | first %} diff --git a/_layouts/single.html b/_layouts/single.html index 87f34487393d54999b5468e75631db4c463ef9d4..908ece758e6ac558d5c78c2f14f5c89c0c8ad641 100644 --- a/_layouts/single.html +++ b/_layouts/single.html @@ -2,9 +2,11 @@ layout: default --- -{% assign author = page.url | split: "/" %} -{% assign author = author[1] %} -{% assign author = site.data.authors.authors | where: "prefix", author | first %} +{% unless page.author %} + {% assign author = page.url | split: "/" %} + {% assign author = author[1] %} +{% endunless %} +{% assign author = site.data.authors.authors | where: "directory", author | first %} {% if page.has_header %} {% include page__hero.html %}