mirror of
https://github.com/Brandon-Rozek/website-theme.git
synced 2024-11-09 10:50:34 -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"}}
|
{{ define "main"}}
|
||||||
<h1>{{ .Title }}</h1>
|
<h1>{{ .Title }}</h1>
|
||||||
{{ partial "header.html" . }}
|
{{ partial "header.html" . }}
|
||||||
|
{{ if not .Date.IsZero }}
|
||||||
<!-- date -->
|
<!-- date -->
|
||||||
{{ $singlePageDateFormat := .Site.Params.singlePageDateFormat | default "January 2, 2006"}}
|
{{ $singlePageDateFormat := .Site.Params.singlePageDateFormat | default "January 2, 2006"}}
|
||||||
<p class="date">{{ .Date.Format $singlePageDateFormat }}</p>
|
<p class="date">{{ .Date.Format $singlePageDateFormat }}</p>
|
||||||
|
{{ end }}
|
||||||
<!-- tags -->
|
<!-- tags -->
|
||||||
{{ if .Param "tags" }}
|
{{ if .Param "tags" }}
|
||||||
<div id="tags">
|
<div id="tags">
|
||||||
|
|
Loading…
Reference in a new issue