diff --git a/_config.yml b/_config.yml index db8e770..3a78cdc 100644 --- a/_config.yml +++ b/_config.yml @@ -127,6 +127,7 @@ plugins: scholar: last_name: Einstein + first_name: [Albert, A.] style: apa locale: en diff --git a/_layouts/bib.html b/_layouts/bib.html index 35cd677..241ac1c 100644 --- a/_layouts/bib.html +++ b/_layouts/bib.html @@ -19,15 +19,21 @@
{{entry.title}}
{% for author in entry.author_array %} + {% assign author_is_self = false %} + {% if author.last == site.scholar.last_name%} + {% if site.scholar.first_name contains author.first%} + {% assign author_is_self = true %} + {% endif %} + {% endif %} {% if forloop.length == 1 %} - {% if author.last == site.scholar.last_name %} + {% if author_is_self %} {{author.last}}, {{author.first}} {% else %} {{author.last}}, {{author.first}} {% endif %} {% else %} {% unless forloop.last %} - {% if author.last == site.scholar.last_name %} + {% if author_is_self %} {{author.last}}, {{author.first}}, {% else %} {% if site.data.coauthors[author.last] %} @@ -37,7 +43,7 @@ {% endif %} {% endif %} {% else %} - {% if author.last == site.scholar.last_name %} + {% if author_is_self %} and {{author.last}}, {{author.first}} {% else %} {% if site.data.coauthors[author.last] %}