This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch fix/blog-author-name-fallback in repository https://gitbox.apache.org/repos/asf/camel-website.git
commit c38fe8c6cdfedacee9c006a4e0b64339945d0c97 Author: Claus Ibsen <[email protected]> AuthorDate: Sat Nov 28 16:20:48 2026 +0100 chore: blog - show the GitHub login of an author without a display name 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>
