fix for pages with no date value
About pages and similar might not have a meaningful date value, so avoid formatting the value if not present, since that would output a nonsensical value like “January 1, 0001”.
This commit is contained in:
		@@ -1,6 +1,8 @@
 | 
			
		||||
{{ define "main" }}
 | 
			
		||||
<h1 class="post-title">{{ .Title }}</h1>
 | 
			
		||||
    {{ if .Date }}
 | 
			
		||||
    <time>{{ .Date.Format "January 2, 2006" }}</time>
 | 
			
		||||
    {{ end }}
 | 
			
		||||
    <div>
 | 
			
		||||
        <p>
 | 
			
		||||
        {{ .Content }}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user