Fixed display of author names on post_by... pages.
This commit is contained in:
		
							parent
							
								
									93ea2bd689
								
							
						
					
					
						commit
						2ea0ba2437
					
				
					 2 changed files with 24 additions and 4 deletions
				
			
		| 
						 | 
					@ -39,6 +39,16 @@ layout: default
 | 
				
			||||||
                            {% endif %}
 | 
					                            {% endif %}
 | 
				
			||||||
                        {% endif %}
 | 
					                        {% endif %}
 | 
				
			||||||
                        -->
 | 
					                        -->
 | 
				
			||||||
 | 
					                        {% if post.author %}
 | 
				
			||||||
 | 
					                            {% assign author = site.data.authors[post.author] %}
 | 
				
			||||||
 | 
					                            {% if author %}
 | 
				
			||||||
 | 
					                                {% assign author_name = author.name %}
 | 
				
			||||||
 | 
					                            {% else %}
 | 
				
			||||||
 | 
					                                {% assign author_name = post.author %}
 | 
				
			||||||
 | 
					                            {% endif %}
 | 
				
			||||||
 | 
					                        {% else %}
 | 
				
			||||||
 | 
					                            {% assign author_name = site.title %}
 | 
				
			||||||
 | 
					                        {% endif %}
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
                        <div class="post-preview">
 | 
					                        <div class="post-preview">
 | 
				
			||||||
                            <a href="{{ post.url | prepend: site.baseurl }}">
 | 
					                            <a href="{{ post.url | prepend: site.baseurl }}">
 | 
				
			||||||
| 
						 | 
					@ -50,7 +60,7 @@ layout: default
 | 
				
			||||||
                                </h3>
 | 
					                                </h3>
 | 
				
			||||||
                                {% endif %}
 | 
					                                {% endif %}
 | 
				
			||||||
                            </a>
 | 
					                            </a>
 | 
				
			||||||
                            <p class="post-meta">Posted by {% if post.author %}{{ post.author }}{% else %}{{ site.title }}{% endif %} on {{ post.date | date: "%B %-d, %Y" }}</p>
 | 
					                            <p class="post-meta">Posted by {{ author_name }} on {{ post.date | date: "%B %-d, %Y" }}</p>
 | 
				
			||||||
                        </div>
 | 
					                        </div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                        <hr>
 | 
					                        <hr>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -39,6 +39,16 @@ layout: default
 | 
				
			||||||
                            {% endif %}
 | 
					                            {% endif %}
 | 
				
			||||||
                        {% endif %}
 | 
					                        {% endif %}
 | 
				
			||||||
                        -->
 | 
					                        -->
 | 
				
			||||||
 | 
					                        {% if post.author %}
 | 
				
			||||||
 | 
					                            {% assign author = site.data.authors[post.author] %}
 | 
				
			||||||
 | 
					                            {% if author %}
 | 
				
			||||||
 | 
					                                {% assign author_name = author.name %}
 | 
				
			||||||
 | 
					                            {% else %}
 | 
				
			||||||
 | 
					                                {% assign author_name = post.author %}
 | 
				
			||||||
 | 
					                            {% endif %}
 | 
				
			||||||
 | 
					                        {% else %}
 | 
				
			||||||
 | 
					                            {% assign author_name = site.title %}
 | 
				
			||||||
 | 
					                        {% endif %}
 | 
				
			||||||
                                          
 | 
					                                          
 | 
				
			||||||
                        <div class="post-preview">
 | 
					                        <div class="post-preview">
 | 
				
			||||||
                            <a href="{{ post.url | prepend: site.baseurl }}">
 | 
					                            <a href="{{ post.url | prepend: site.baseurl }}">
 | 
				
			||||||
| 
						 | 
					@ -50,7 +60,7 @@ layout: default
 | 
				
			||||||
                                </h3>
 | 
					                                </h3>
 | 
				
			||||||
                                {% endif %}
 | 
					                                {% endif %}
 | 
				
			||||||
                            </a>
 | 
					                            </a>
 | 
				
			||||||
                            <p class="post-meta">Posted by {% if post.author %}{{ post.author }}{% else %}{{ site.title }}{% endif %} on {{ post.date | date: "%B %-d, %Y" }}</p>
 | 
					                            <p class="post-meta">Posted by {{ author_name }} on {{ post.date | date: "%B %-d, %Y" }}</p>
 | 
				
			||||||
                        </div>
 | 
					                        </div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                        <hr>
 | 
					                        <hr>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue