This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-website.git


The following commit(s) were added to refs/heads/main by this push:
     new 244bd409 chore: blog - show the GitHub login of an author without a 
display name (#1873)
244bd409 is described below

commit 244bd409b6bff871f51970334370eed95465db0c
Author: Claus Ibsen <[email protected]>
AuthorDate: Sun Nov 29 08:02:17 2026 +0100

    chore: blog - show the GitHub login of an author without a display name 
(#1873)
    
    The blog post and the blog summary show the name of the GitHub profile of
    each author. An author who has not set a display name on GitHub was shown
    with an empty name. Fall back to the GitHub login instead.
    
    Co-authored-by: Claude Opus 5.5 <[email protected]>
---
 layouts/blog/post.html    | 2 +-
 layouts/blog/summary.html | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/layouts/blog/post.html b/layouts/blog/post.html
index cbb84400..d9d92240 100644
--- a/layouts/blog/post.html
+++ b/layouts/blog/post.html
@@ -25,7 +25,7 @@
                 {{ with getJSON "https://api.github.com/users/"; $author 
$headers }}
                 <div class="post-author">
                   <img class="post-avatar" src="{{ .avatar_url }}" alt="">
-                  <div class="post-author-name">{{ .name }}</div>
+                  <div class="post-author-name">{{ .name | default .login 
}}</div>
                 </div>
                 {{ end }}
               {{ end }}
diff --git a/layouts/blog/summary.html b/layouts/blog/summary.html
index f432517f..935244f2 100644
--- a/layouts/blog/summary.html
+++ b/layouts/blog/summary.html
@@ -22,7 +22,7 @@
                 {{ else }}
                   {{ $headers = dict "Authorization" (printf "Basic %s" 
(printf "%s:%s" $.Site.Params.GitHubUsername $.Site.Params.GitHubToken | 
base64Encode)) }}
                 {{ end }}
-                {{ range $idx, $author := .Params.authors }}{{ if gt $idx 0 
}}, {{ end }}<span rel="author">{{ (getJSON "https://api.github.com/users/"; 
$author $headers).name }}</span>{{ end }}</span>
+                {{ range $idx, $author := .Params.authors }}{{ if gt $idx 0 
}}, {{ end }}<span rel="author">{{ with getJSON "https://api.github.com/users/"; 
$author $headers }}{{ .name | default .login }}{{ end }}</span>{{ end }}</span>
         </div>
     </div>
 </article>

Reply via email to