hugo-soresu

My fork of hugo-xmin

git clone git://git.shimmy1996.com/hugo-soresu.git
commit 6e6fa9293d5bd374dce84d55721fdb2733897c95
parent 1362671170e2f6738217a253e0a3d4aa65a08817
Author: Shimmy Xu <shimmy.xu@shimmy1996.com>
Date:   Thu, 24 May 2018 22:28:16 -0500

Use dates formatted according to ISO 8601.

Diffstat:
Mlayouts/_default/list.html | 4++--
Mlayouts/_default/single.html | 2+-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/layouts/_default/list.html b/layouts/_default/list.html
@@ -15,7 +15,7 @@
   <ul>
     {{ range (where .Data.Pages "Section" "!=" "") }}
     <li>
-      <span class="date">{{ .Date.Format "2006/01/02" }}</span>
+      <span class="date">{{ .Date.Format "2006-01-02" }}</span>
       <a href="{{ .URL }}">{{ .Title }}</a>
       <br>
       {{.Description}}
@@ -26,7 +26,7 @@
   <ul>
     {{ range first 5 (where .Data.Pages "Section" "!=" "") }}
     <li>
-      <span class="date">{{ .Date.Format "2006/01/02" }}</span>
+      <span class="date">{{ .Date.Format "2006-01-02" }}</span>
       <a href="{{ .URL }}">{{ .Title }}</a>
       <br>
       {{ .Description }}
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
@@ -2,7 +2,7 @@
 <div class="article-meta">
 <h1><span class="title">{{ .Title }}</span></h1>
 {{ with .Params.author }}<h2 class="author">{{ . }}</h2>{{ end }}
-{{ if (lt 0 .Params.date) }}<h2 class="date">{{ .Date.Format "2006/01/02" }}</h2>{{ end }}
+{{ if (lt 0 .Params.date) }}<h2 class="date">{{ .Date.Format "2006-01-02" }}</h2>{{ end }}
 <p class="terms">
   {{ range $i := (slice "categories" "tags") }}
   {{ with ($.Param $i) }}