yamt

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

section.html (504B)


      1 {{ define "main" }}
      2 {{- if .Content }}
      3 <article>
      4 <h1>{{ .Title }}</h1>
      5 {{- with .Site.GetPage "section" "posts" -}}
      6 {{- with .OutputFormats.Get "RSS" -}}
      7 <a href="{{ .RelPermalink }}">{{ T "rssFeed" }}</a>
      8 {{- end -}}
      9 {{- end }}
     10 {{ .Content -}}
     11 </article>
     12 <hr>
     13 {{- end }}
     14 <div class="previews">
     15 {{ range $index, $page := (sort .RegularPages ".Date" "desc") -}}
     16 {{- partial "preview.html" $page -}}
     17 {{- if ne (sub (len $.RegularPages) 1) $index -}}
     18 <hr class="sep">
     19 {{ end -}}
     20 {{ end -}}
     21 </div>
     22 {{ end }}