hugo-theme-introduction/layouts/_default/list.html
Victoria Drake fade059bf5 Use layout identifiers for dates
- Adds new Hugo feature
  (https://gohugo.io/functions/dateformat/#datetime-formatting-layouts)
enabling date localization in defaults
2022-02-14 06:42:27 -06:00

22 lines
564 B
HTML

{{ define "main" }}
<div class="container markdown top-pad">
{{ .Content }}
</div>
<div class="container">
<ul>
{{ range .Pages.ByPublishDate.Reverse }}
{{ if .Date }}
<li>
<a href="{{ .Permalink }}">{{ .Date.Format (.Site.Params.dateFormat | default ":date_medium") }} |
{{ .Title | markdownify }}</a>
</li>
{{ else }}
<li>
<a href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
</li>
{{ end }}
{{ end }}
</ul>
</div>
</body>
{{ end }}