kern

White space theme for Hugo
Log | Files | Refs | LICENSE

section.html (610B)


      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 class="rss-link" href="{{ .RelPermalink }}">{{ T "rssFeed" }}</a>
      8       {{- end -}}
      9     {{- end }}
     10     {{ .Content -}}
     11     </article>
     12     {{ if .RegularPages }}
     13       <hr>
     14     {{ end }}
     15   {{- end }}
     16   <div class="previews">
     17     {{ range $i, $page := (sort .RegularPages ".Date" "desc") -}}
     18       {{- if $i }}<hr class="preview-seperator">{{ end }}
     19       {{- partial "preview.html" $page -}}
     20     {{ end -}}
     21   </div>
     22 {{ end }}