Addad param for dateformat.
This commit is contained in:
parent
64e682092d
commit
38a7cfc25b
3 changed files with 4 additions and 2 deletions
|
|
@ -63,6 +63,8 @@ params:
|
|||
cacheBustJS: true # Add a cache busting hash on script.js
|
||||
sidebar: true # Show a sidebar to the right
|
||||
submitted: false # Show author and date information for a post.
|
||||
dateformat: "" # Set the date format, default to "2 January, 2006"
|
||||
|
||||
```
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
<li><a href="{{ .RelPermalink }}">{{ .Title }}</a> {{ .Date }}</li>
|
||||
<li><a href="{{ .RelPermalink }}">{{ .Title }}</a> – {{ .Date.Format ($.Param "dateformat" | default "2 January, 2006") }}</li>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<p class="submitted">
|
||||
{{ with $.Param "author" }}<span class="author">{{ . }}</span> – {{ end -}}
|
||||
<span class="created-date">{{ .Date.Format "2 January, 2006" }}</span>
|
||||
<span class="created-date">{{ .Date.Format ($.Param "dateformat" | default "2 January, 2006") }}</span>
|
||||
</p>
|
||||
|
|
|
|||
Loading…
Reference in a new issue