yamt

YAMT: Yet Another Minimal Theme for Hugo
git clone https://git.ckiri.com/yamt.git
Log | Files | Refs | LICENSE

home.html (686B)


      1 {{ define "main" }}
      2 <article>
      3 {{ .Content -}}
      4 </article>
      5 {{- $posts := where .Site.RegularPages "Section" "posts" }}
      6 {{- with $posts }}
      7 <hr>
      8 <div class="recent-posts">
      9 <div>{{ T "recentPosts" }}:</div>
     10 <div class="pages">
     11 {{- range first 3 . -}}
     12 <div class="page-item" id="{{ .File.ContentBaseName }}">
     13 {{ $dateTime := .Date | time.Format "2006-01-02T15:04:05-07:00" -}}
     14 {{- $dateF := .Date | time.Format ":date_medium" -}}
     15 {{- $timeF := .Date | time.Format ":time_short" -}}
     16 <div>
     17 <span><time datetime="{{ $dateTime }}">{{ $dateF }} {{ $timeF }}</time>:</span>
     18 </div>
     19 <div>
     20 <a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a>
     21 </div>
     22 </div>
     23 {{- end }}
     24 </div>
     25 </div>
     26 {{- end }}
     27 {{ end }}