Add dates and tags to blog posts and fix date formating so it's localized
This commit is contained in:
parent
10d9e6870e
commit
cd9afef68d
2 changed files with 12 additions and 4 deletions
|
@ -8,10 +8,7 @@
|
||||||
{{ range $pages.ByPublishDate.Reverse }}
|
{{ range $pages.ByPublishDate.Reverse }}
|
||||||
<p>
|
<p>
|
||||||
<a href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
|
<a href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
|
||||||
{{ $customDateFormat := "January 2, 2006" }}
|
<small class="text-secondary">{{ .PublishDate | time.Format ":date_medium" }}</small>
|
||||||
{{ with .Site.Params.customDateFormat }}{{ $customDateFormat = . }}{{ end }}
|
|
||||||
<br>
|
|
||||||
<small class="text-secondary">{{ .PublishDate.Format $customDateFormat }}</small>
|
|
||||||
{{ partial "tags" . }}
|
{{ partial "tags" . }}
|
||||||
{{ if eq .Site.Params.showPostSummary true }}
|
{{ if eq .Site.Params.showPostSummary true }}
|
||||||
<br>
|
<br>
|
||||||
|
|
11
themes/datacoop2020/layouts/blog/single.html
Normal file
11
themes/datacoop2020/layouts/blog/single.html
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
{{- define "main" -}}
|
||||||
|
|
||||||
|
<h1>{{ .Title | markdownify }}</h1>
|
||||||
|
|
||||||
|
<small class="text-secondary">{{ .PublishDate | time.Format ":date_medium" }}</small>
|
||||||
|
{{ partial "tags" . }}
|
||||||
|
|
||||||
|
|
||||||
|
{{ .Content }}
|
||||||
|
|
||||||
|
{{- end -}}
|
Loading…
Add table
Reference in a new issue