mirror of
https://github.com/Brandon-Rozek/website-theme.git
synced 2024-11-21 07:46:30 -05:00
Merge pull request #72 from Phyxius/no-zero-dates
Don't show date if not set
This commit is contained in:
commit
7aa4f02cd3
1 changed files with 2 additions and 0 deletions
|
@ -1,9 +1,11 @@
|
|||
{{ define "main"}}
|
||||
<h1>{{ .Title }}</h1>
|
||||
{{ partial "header.html" . }}
|
||||
{{ if not .Date.IsZero }}
|
||||
<!-- date -->
|
||||
{{ $singlePageDateFormat := .Site.Params.singlePageDateFormat | default "January 2, 2006"}}
|
||||
<p class="date">{{ .Date.Format $singlePageDateFormat }}</p>
|
||||
{{ end }}
|
||||
<!-- tags -->
|
||||
{{ if .Param "tags" }}
|
||||
<div id="tags">
|
||||
|
|
Loading…
Reference in a new issue