Fix list date shown as 0001-01-01 when not set
This commit is contained in:
		
							parent
							
								
									aad3300fb5
								
							
						
					
					
						commit
						d7e289572a
					
				| @ -20,9 +20,11 @@ | |||||||
|           <a href="{{ .Permalink }}">{{ .Title | markdownify }}</a> |           <a href="{{ .Permalink }}">{{ .Title | markdownify }}</a> | ||||||
|         </h1> |         </h1> | ||||||
|         <div class="post-meta"> |         <div class="post-meta"> | ||||||
|  |           {{- with .Date }} | ||||||
|           <span class="post-date"> |           <span class="post-date"> | ||||||
|             {{ .Date.Format "2006-01-02" }} |             {{ .Format "2006-01-02" }} | ||||||
|           </span> |           </span> | ||||||
|  |           {{- end }} | ||||||
|           {{ with .Params.Author }} |           {{ with .Params.Author }} | ||||||
|             <span class="post-author">:: {{ . }}</span> |             <span class="post-author">:: {{ . }}</span> | ||||||
|           {{ end }} |           {{ end }} | ||||||
|  | |||||||
| @ -11,9 +11,11 @@ | |||||||
|           <a href="{{ .Permalink }}">{{ .Title | markdownify }}</a> |           <a href="{{ .Permalink }}">{{ .Title | markdownify }}</a> | ||||||
|         </h1> |         </h1> | ||||||
|         <div class="post-meta"> |         <div class="post-meta"> | ||||||
|  |         {{- with .Date }} | ||||||
|           <span class="post-date"> |           <span class="post-date"> | ||||||
|             {{ .Date.Format "2006-01-02" }} |             {{ .Format "2006-01-02" }} | ||||||
|           </span> |           </span> | ||||||
|  |         {{- end }} | ||||||
|           {{ with .Params.Author }} |           {{ with .Params.Author }} | ||||||
|             <span class="post-author">:: {{ . }}</span> |             <span class="post-author">:: {{ . }}</span> | ||||||
|           {{ end }} |           {{ end }} | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user