layout: improve date displayed

Co-Authored-by: Igor Milhit <igor@milhit@.ch>
pull/31/head
iGor milhit 2019-08-26 07:20:19 +02:00
parent 02d6d2f086
commit 55dadc702c
No known key found for this signature in database
GPG Key ID: 3B5043D919E99ED2
3 changed files with 3 additions and 3 deletions

View File

@ -10,7 +10,7 @@
{{ range .Pages }} {{ range .Pages }}
<article> <article>
<a href="{{.Permalink}}">{{.Title}}</a> <a href="{{.Permalink}}">{{.Title}}</a>
&mdash; {{.Date.Format "2006-01-02"}} &mdash; {{.PublishDate.Format "2006-01-02"}}
</article> </article>
{{ end }} {{ end }}
</article> </article>

View File

@ -17,7 +17,7 @@
<item> <item>
<title>{{ .Title }}</title> <title>{{ .Title }}</title>
<link>{{ .Permalink }}</link> <link>{{ .Permalink }}</link>
<pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate> <pubDate>{{ .PublishDate.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
{{ with .Site.Author.email }}<author>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</author>{{end}} {{ with .Site.Author.email }}<author>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</author>{{end}}
<guid>{{ .Permalink }}</guid> <guid>{{ .Permalink }}</guid>
<description>{{ .Content | html }}</description> <description>{{ .Content | html }}</description>

View File

@ -6,7 +6,7 @@
<a href="{{ .Permalink }}"> <a href="{{ .Permalink }}">
{{.Title}} {{.Title}}
</a> </a>
&mdash; {{ .Date.Format "2006-01-02" }} &mdash; {{ .PublishDate.Format "2006-01-02" }}
{{ with .Params.categories }} {{ with .Params.categories }}
{{ range . }} {{ range . }}
&mdash; <a href="{{ "categories" | absURL}}/{{ . | urlize }}">{{ . }}</a> &mdash; <a href="{{ "categories" | absURL}}/{{ . | urlize }}">{{ . }}</a>