Skip to content

Commit

Permalink
Merge pull request #58 from kirisakow/make-date-mention-optinal-fix-y…
Browse files Browse the repository at this point in the history
…ear-0001-bug

fix date "Monday, Jan 1, 0001" rendered by default when no date value is provided in `index.md`
  • Loading branch information
JugglerX authored Jun 15, 2023
2 parents a5f7c53 + a28a938 commit e34da49
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 e34da49

Please sign in to comment.