People may not always define description, author, and date in their front matter. This change skips adding each field to the aside if it is missing.
		
			
				
	
	
		
			20 lines
		
	
	
		
			593 B
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			20 lines
		
	
	
		
			593 B
		
	
	
	
		
			HTML
		
	
	
	
	
	
{{ define "main" }}
 | 
						|
    <header class="content__header">
 | 
						|
        <h1>{{ .Title | markdownify }}</h1>
 | 
						|
    </header>
 | 
						|
    <div class="content__body">
 | 
						|
        {{ .Content }}
 | 
						|
    </div>
 | 
						|
    <footer class="content__footer"></footer>
 | 
						|
{{ end }}
 | 
						|
 | 
						|
{{define "aside" }}
 | 
						|
    {{ if .Params.description }}<p>{{ .Params.description }}</p>{{ end }}
 | 
						|
    {{ if or (.Params.author) (.Params.date) }}
 | 
						|
        <p>
 | 
						|
            {{ if .Params.author }}By {{ .Params.author }}{{ if .Date }}, {{ end }}{{ end }}
 | 
						|
            {{ if .Date }}{{ .Date.Format "2 January 2006" }}{{ end }}
 | 
						|
        </p>
 | 
						|
    {{ end }}
 | 
						|
{{ end }}
 |