Skip to content

Commit

Permalink
fix: localize the full date and full lastmod (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
razonyang committed Dec 14, 2023
1 parent 16a932f commit b53d89d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions layouts/partials/hb/modules/revision/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
{{- $format := default ":date_full" $params.date_format }}
{{- if ne .Lastmod .Date }}
{{- $lastmod := .Lastmod | time.Format $format }}
<span class="hb-revision-lastmod me-2" title="{{ i18n `revised_at` (dict `Date` .Lastmod) }}">
{{- $lastmodFull := printf "%s %s" (.Lastmod | time.Format ":date_full") (.Lastmod | time.Format ":time_full") }}
<span class="hb-revision-lastmod me-2" title="{{ i18n `revised_at` (dict `Date` $lastmodFull) }}">
{{- if $icons }}
{{ partial "icons/icon" (dict "vendor" "bs" "name" "pencil-square") }}
<span>{{ $lastmod }}</span>
Expand All @@ -14,7 +15,8 @@
</span>
{{- end }}
{{- $date := .Date | time.Format $format }}
<span class="hb-revision-date" title="{{ i18n `created_at` (dict `Date` .Date) }}">
{{- $dateFull := printf "%s %s" (.Date | time.Format ":date_full") (.Date | time.Format ":time_full") }}
<span class="hb-revision-date" title="{{ i18n `created_at` (dict `Date` $dateFull) }}">
{{- if $icons }}
{{ partial "icons/icon" (dict "vendor" "bs" "name" "calendar-plus") }}
<span>{{ $date }}</span>
Expand Down

0 comments on commit b53d89d

Please sign in to comment.