Skip to content

Commit

Permalink
fix date "Monday, Jan 1, 0001" rendered when no date is provided in i…
Browse files Browse the repository at this point in the history
…ndex.md
  • Loading branch information
kirisakow authored May 8, 2023
1 parent 4220fba commit a28a938
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions layouts/_default/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
<div class="row justify-content-center">
<div class="col-12 col-md-9">
<h1>{{.Title}}</h1>
{{ dateFormat "Monday, Jan 2, 2006" .Date }}
{{if .Params.author}}Author: {{.Params.Author}}{{end}}
{{ if .Date }}{{ dateFormat "Monday, Jan 2, 2006" .Date }}{{ end }}
{{ if .Params.author}}Author: {{.Params.Author}}{{ end }}
<div class="content">
{{.Content}}
</div>
Expand Down

0 comments on commit a28a938

Please sign in to comment.