Skip to content

Commit

Permalink
Add lastmod date
Browse files Browse the repository at this point in the history
Signed-off-by: aries <aries@asterism.xyz>
  • Loading branch information
orlea committed Sep 11, 2023
1 parent d0ec11e commit eb27f18
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions i18n/en.toml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ other = "{{ .ReadingTime }} min read"
[series_posts]
other = "Posts in this series"

[last_update]
other = "updated"

# search
[quick_links]
other = "Results"
Expand Down
3 changes: 3 additions & 0 deletions layouts/partials/post-meta.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
<span>{{ partial "sprite" (dict "icon" "calendar") }}</span>
<span class="post_date">
{{ .Date.Format (default "Jan 2, 2006" $.Site.Params.dateFormat) -}}
{{ if ne .Date .Lastmod}}
{{ T "last_update" . }} {{ .Lastmod.Format (default "Jan 2, 2006" $.Site.Params.dateFormat) -}}
{{ end}}
</span>
{{- $scratch.Set "writeSeparator" true }}
{{- end }}
Expand Down

0 comments on commit eb27f18

Please sign in to comment.