From 2a4fbf6a7925da610a75c498116da7cf9ba857d7 Mon Sep 17 00:00:00 2001 From: Chuck Houpt Date: Wed, 6 Dec 2023 09:38:11 -0500 Subject: [PATCH] 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 --- _layouts/post.html | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/_layouts/post.html b/_layouts/post.html index 4dd9efc..f7818bf 100644 --- a/_layouts/post.html +++ b/_layouts/post.html @@ -61,7 +61,11 @@ tail_includes: {% 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 %}