Skip to content
Permalink
Browse files

Fixes bug when generating publications from single authors. (#27)

* Fixes bug when generating publications from single authors.

* Fixes generation of author string for multiple authors

* Fixed number of spaces in indentation
  • Loading branch information
tresoldi authored and alshedivat committed Sep 30, 2018
1 parent 9cbed31 commit 488cb39f9cedc1cf50af780bb71ac5232ef92ebf
Showing with 22 additions and 15 deletions.
  1. +22 −15 _layouts/bib.html
@@ -16,28 +16,35 @@
<span class="title">{{entry.title}}</span>
<span class="author">
{% for author in entry.author_array %}
{% unless forloop.last %}
{% if forloop.length == 1 %}
{% if author.last == site.scholar.last_name %}
<em>{{author.last}}, {{author.first}}</em>,
<em>{{author.last}}, {{author.first}}</em>
{% else %}
{% if site.data.coauthors[author.last] %}
<a href="{{site.data.coauthors[author.last].url}}" target="_blank">{{author.last}}, {{author.first}}</a>,
{% else %}
{{author.last}}, {{author.first}},
{% endif %}
{{author.last}}, {{author.first}}
{% endif %}
{% else %}
and
{% if author.last == site.scholar.last_name %}
<em>{{author.last}}, {{author.first}}</em>
{% unless forloop.last %}
{% if author.last == site.scholar.last_name %}
<em>{{author.last}}, {{author.first}}</em>,
{% else %}
{% if site.data.coauthors[author.last] %}
<a href="{{site.data.coauthors[author.last].url}}" target="_blank">{{author.last}}, {{author.first}}</a>,
{% else %}
{{author.last}}, {{author.first}},
{% endif %}
{% endif %}
{% else %}
{% if site.data.coauthors[author.last] %}
<a href="{{site.data.coauthors[author.last].url}}" target="_blank">{{author.last}}, {{author.first}}</a>
{% if author.last == site.scholar.last_name %}
and <em>{{author.last}}, {{author.first}}</em>
{% else %}
{{author.last}}, {{author.first}}
{% if site.data.coauthors[author.last] %}
and <a href="{{site.data.coauthors[author.last].url}}" target="_blank">{{author.last}}, {{author.first}}</a>
{% else %}
and {{author.last}}, {{author.first}}
{% endif %}
{% endif %}
{% endif %}
{% endunless %}
{% endunless %}
{% endif %}
{% endfor %}
</span>

0 comments on commit 488cb39

Please sign in to comment.
You can’t perform that action at this time.