Merge pull request #184 from SandaruKasa/last-modified
`lastMod` support
This commit is contained in:
commit
f6769864be
@ -51,3 +51,6 @@ lightTheme:
|
||||
|
||||
readNext:
|
||||
other: "Read next"
|
||||
|
||||
lastMod:
|
||||
other: "Last modified:"
|
||||
|
@ -48,3 +48,6 @@ lightTheme:
|
||||
|
||||
readNext:
|
||||
other: "Читать далее"
|
||||
|
||||
lastMod:
|
||||
other: "Отредактировано:"
|
||||
|
@ -2,10 +2,20 @@
|
||||
{{ if .Site.Params.dateFormat }}
|
||||
{{ $dateFormat = .Site.Params.dateFormat }}
|
||||
{{ end }}
|
||||
{{ $machineDateFormat := "2006-01-02" }}
|
||||
|
||||
<div class="post-info">
|
||||
{{ if .Params.date }}
|
||||
<div class="post-date dt-published"><a class="u-url" href="{{ .RelPermalink }}">{{ .Params.date.Format $dateFormat }}<a/></div>
|
||||
<div class="post-date dt-published">
|
||||
<a class="u-url" href="{{ .RelPermalink }}"><time datetime="{{ .Params.date.Format $machineDateFormat }}">
|
||||
{{- .Params.date.Format $dateFormat -}}
|
||||
</time></a>
|
||||
{{ if ne .Params.date .Params.lastMod -}}
|
||||
[{{ i18n "lastMod" }} <time datetime="{{ .Params.lastMod.Format $machineDateFormat }}">
|
||||
{{- .Params.lastMod.Format $dateFormat -}}
|
||||
</time>]
|
||||
{{- end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
<a class="post-hidden-url u-url" href="{{ .Permalink }}">{{ .Permalink }}</a>
|
||||
|
Loading…
Reference in New Issue
Block a user