mirror of
https://git.sr.ht/~seirdy/seirdy.one
synced 2024-11-23 21:02:09 +00:00
Use a sane date format
ISO 8601 and RFC 3339 are the correct date formats. The other date formats are incorrect.
This commit is contained in:
parent
8e38c66243
commit
25ffbd9bbb
2 changed files with 3 additions and 2 deletions
|
@ -3,7 +3,7 @@
|
||||||
<header id="post-header">
|
<header id="post-header">
|
||||||
<h1>{{ .Title }}</h1>
|
<h1>{{ .Title }}</h1>
|
||||||
{{- if isset .Params "date" -}}
|
{{- if isset .Params "date" -}}
|
||||||
<time>{{ .Date.Format "January 2, 2006" }}</time>
|
<time datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}">{{ .Date.Format "2006-01-02" }}</time>
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
</header>
|
</header>
|
||||||
{{- .Content -}}
|
{{- .Content -}}
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
<h3>Posts</h3>
|
<h3>Posts</h3>
|
||||||
|
<p><em>Timestamp format: <code>YYYY-MM-DD</code>, as per <a href="https://www.ietf.org/rfc/rfc3339.txt">RFC 3339</a> and <a href="https://xkcd.com/1179/">ISO 8601</a></em></p>
|
||||||
<ul id="posts">
|
<ul id="posts">
|
||||||
{{- range where site.RegularPages "Type" "in" site.Params.mainSections }}
|
{{- range where site.RegularPages "Type" "in" site.Params.mainSections }}
|
||||||
<li>
|
<li>
|
||||||
<time>{{ .Date.Format "Jan 2, 2006" }}</time>
|
<time datetime="{{ .Date.Format "2006-01-02 15:04:05Z07:00" }}">{{ .Date.Format "2006-01-02" }}</time>
|
||||||
<br>
|
<br>
|
||||||
<a href="{{ .Permalink }}">
|
<a href="{{ .Permalink }}">
|
||||||
{{ .Title }}
|
{{ .Title }}
|
||||||
|
|
Loading…
Reference in a new issue