fix: url-less authors should not have empty links (#1410)
The url field from authors.yml is optional, so no link should be build when the url is empty or not defined. Fix #1403
This commit is contained in:
parent
84ea68cab0
commit
2a4fbf6a79
1 changed files with 5 additions and 1 deletions
|
@ -61,7 +61,11 @@ tail_includes:
|
||||||
<em>
|
<em>
|
||||||
{% if authors %}
|
{% if authors %}
|
||||||
{% for author in authors %}
|
{% for author in authors %}
|
||||||
<a href="{{ site.data.authors[author].url }}">{{ site.data.authors[author].name }}</a>
|
{% if site.data.authors[author].url -%}
|
||||||
|
<a href="{{ site.data.authors[author].url }}">{{ site.data.authors[author].name }}</a>
|
||||||
|
{%- else -%}
|
||||||
|
{{ site.data.authors[author].name }}
|
||||||
|
{%- endif %}
|
||||||
{% unless forloop.last %}{{ '</em>, <em>' }}{% endunless %}
|
{% unless forloop.last %}{{ '</em>, <em>' }}{% endunless %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% else %}
|
{% else %}
|
||||||
|
|
Loading…
Reference in a new issue