Browse Source

adjust single.html date and list.html section

Alexander Avery 3 weeks ago
parent
commit
fca23d88f3
  1. 2
      layouts/_default/list.html
  2. 2
      layouts/_default/single.html

2
layouts/_default/list.html

@ -1,8 +1,10 @@
{{ define "main" }} {{ define "main" }}
<h1>{{ .Title }}</h1> <h1>{{ .Title }}</h1>
{{ .Content }} {{ .Content }}
<section>
{{ range .Pages }} {{ range .Pages }}
<h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2> <h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2>
{{ .Summary }} {{ .Summary }}
{{ end }} {{ end }}
</section>
{{ end }} {{ end }}

2
layouts/_default/single.html

@ -2,7 +2,7 @@
<h1>{{ .Title }}</h1> <h1>{{ .Title }}</h1>
{{ $dateMachine := .Date | time.Format "2006-01-02T15:04:05-07:00" }} {{ $dateMachine := .Date | time.Format "2006-01-02T15:04:05-07:00" }}
{{ $dateHuman := .Date | time.Format ":date_long" }} {{ $dateHuman := .Date | time.Format "Mon | Jan 2, 2006" }}
<time datetime="{{ $dateMachine }}">{{ $dateHuman }}</time> <time datetime="{{ $dateMachine }}">{{ $dateHuman }}</time>
{{ .Content }} {{ .Content }}

Loading…
Cancel
Save