summaryrefslogtreecommitdiff
path: root/layouts/blog
diff options
context:
space:
mode:
authorVidhu Kant Sharma <vidhukant@vidhukant.com>2023-08-27 17:49:37 +0530
committerVidhu Kant Sharma <vidhukant@vidhukant.com>2023-08-27 17:49:37 +0530
commit6146ded8446baa3d3c4da01ad2f0df35f9142f76 (patch)
tree381ec94532aa560fe90acd55312b63ce7952b8d0 /layouts/blog
parent644c56cafceb495f44c3566fe08e397cfdab85f1 (diff)
using <time> in blog post header
Diffstat (limited to 'layouts/blog')
-rw-r--r--layouts/blog/single.html5
1 files changed, 3 insertions, 2 deletions
diff --git a/layouts/blog/single.html b/layouts/blog/single.html
index 035db0a..f6e3980 100644
--- a/layouts/blog/single.html
+++ b/layouts/blog/single.html
@@ -4,12 +4,12 @@
<h1>{{ .Title }}</h1>
<div id="blog-post-details">
- <span id="date">
+ <time datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}">
Published on
{{ .Date.Format "2" }}{{ if in (slice 1 21 31) .Date.Day}}st{{ else if in (slice 2 22) .Date.Day}}nd{{ else if in (slice 3 23) .Date.Day}}rd{{ else }}th{{ end }}
{{ .Date.Format "January" }}
{{ .Date.Format "2006" }}
- </span>
+ </time>
<span id="reading-time">
Approx
@@ -23,5 +23,6 @@
</header>
{{ .Content }}
+
</article>
{{ end }}