From f11234d8b3050094c836a79e82647a73bb86ba88 Mon Sep 17 00:00:00 2001 From: Chuck Houpt Date: Wed, 6 Dec 2023 08:32:36 -0500 Subject: [PATCH] fix: url-less authors should not have empty links The url field from authors.yml is optional, so no link should be build when the url is empty or not defined. Fix #1403 --- _layouts/post.html | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/_layouts/post.html b/_layouts/post.html index 4dd9efc6068..f7818bf6e0f 100644 --- a/_layouts/post.html +++ b/_layouts/post.html @@ -61,7 +61,11 @@

{{ page.title }}

{% if authors %} {% for author in authors %} - {{ site.data.authors[author].name }} + {% if site.data.authors[author].url -%} + {{ site.data.authors[author].name }} + {%- else -%} + {{ site.data.authors[author].name }} + {%- endif %} {% unless forloop.last %}{{ ', ' }}{% endunless %} {% endfor %} {% else %}