zregvart commented on a change in pull request #210: Feature Avatar on Blog 
Posts
URL: https://github.com/apache/camel-website/pull/210#discussion_r400480592
 
 

 ##########
 File path: layouts/blog/post.html
 ##########
 @@ -9,8 +9,18 @@ <h1><a href="{{.Page.Permalink}}">{{ .Title }}</a></h1>
     <div class="post">
         <aside>
             <div class="summary">{{ .Params.preview }}</div>
-            <time itemprop="published" datetime="{{ dateFormat "2006-01-02" 
.PublishDate }}" title="{{ dateFormat "Monday, January 2, 2006" .PublishDate 
}}">{{ dateFormat "January 2, 2006" .PublishDate }}</time>
-            <p>by <span rel="author">{{ .Params.author }}</span></p>
+            <div class="info">
+                {{ if .Params.github_user }}
+                    {{ $userData := getJSON "https://api.github.com/users/"; 
.Params.github_user }}
+                    <img src="{{ $userData.avatar_url }}" class="avatar" 
alt="{{ .Params.author }}">
+                {{ else }}
+                    <img src="{{ "/_/img/avatar.svg" | relURL }} " 
class="avatar" alt="{{ .Params.author }}">
+                {{ end }}
+                <div class="date-and-name">
+                    <p>by <span rel="author">{{ .Params.author }}</span></p>
 
 Review comment:
   This bit changed in #292 to allow multiple authors on a blog post, can we 
make the same change here and in the `github_user` parameter?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to