home.html 507 B

1234567891011121314
  1. {{ define "main" }}
  2. <h2>Pinned Posts</h2>
  3. {{ range where .Site.RegularPages "Params.tags" "intersect" (slice "pinned") }}
  4. <h1><a href="{{ .Permalink }}">{{ .Title }}</a></h1>
  5. <h2>{{ .Date.Format "2006-01-02" }}</h2>
  6. {{ end }}
  7. <h2>Latest Posts</h2>
  8. {{ $pages := where (where .Site.RegularPages "Section" "posts") "Params.date" "lt" now }}
  9. {{ range first 5 (sort $pages "Date" "desc") }}
  10. <h3><a href="{{ .Permalink }}">{{ .Title }} - {{ .Date.Format "2006-01-02" }}</a></h3>
  11. {{ end }}
  12. {{ end }}