Skip to content

Commit

Permalink
chore: use symantic HTML - <time> tag instead of <p> or <span>
Browse files Browse the repository at this point in the history
  • Loading branch information
hugo-sid committed Mar 13, 2023
1 parent b6d1495 commit 5ce5e25
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion layouts/partials/postCard.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,9 @@
<h4 class="post-item-title">
<a href="{{ .Permalink }}">{{ .Title }}</a>
</h4>
<span class="post-item-date">{{ .Date.Format "Jan 2, 2006" }}</span>
{{/* format date string to create an ISO 8601 string */}}
{{ $ISO_date := "2006-01-02T15:04:05Z0700" }}
<time class="post-item-meta" datetime="{{ .Date.Format $ISO_date }}">
{{ .Date.Format "02 Jan 2006" }}
</time>
</article>

0 comments on commit 5ce5e25

Please sign in to comment.