diff --git a/layouts/partials/featured.html b/layouts/partials/featured.html index 7947851..2a94f52 100644 --- a/layouts/partials/featured.html +++ b/layouts/partials/featured.html @@ -1,15 +1,22 @@ {{ $dateFormat := default "Mon Jan 2, 2006" (index .Site.Params "date_format") }} +{{/* get three random posts: 1 for large feature, 2 for small features */}} +{{ range $index, $element := first 3 (where .Site.RegularPages "Section" "in" .Site.Params.mainSections) | shuffle }} +{{ if eq $index 0 }}
-

Title of a longer featured blog post

-

Multiple lines of text that form the lede, informing new readers quickly and efficiently about what’s most interesting in this post’s contents.

-

Continue reading...

+

{{ .Title }}

+

{{ substr .Description 0 110 }}

+

Continue reading...

+{{ end }} +{{ if eq $index 1 }}
-{{ range first 2 (where .Site.RegularPages "Section" "in" .Site.Params.mainSections) | shuffle }} +{{ end }} + +{{ if or (eq $index 1) (eq $index 2) }}
@@ -40,6 +47,7 @@
{{ end }} +{{ end }}
{{- /* vim: set ts=2 sw=2 et: */}}