layouts: Make featured posts configurable
For now it gets the first three posts with "featured: true" in their frontmatter and displays them in a random order (so no control over the placement of large feature or two smaller features). TODO: gracefully handle the case where there are no pages with the "featured: true" frontmatter so new users don't see a super weird and broken front page.
This commit is contained in:
@ -39,7 +39,7 @@
|
||||
</h3>
|
||||
|
||||
{{ $truncate := default true .Site.Params.truncate }}
|
||||
{{ $paginator := .Paginate (where .Site.RegularPages "Section" "in" .Site.Params.mainSections) }}
|
||||
{{ $paginator := .Paginate (where .Site.RegularPages "Params.featured" "ne" true) }}
|
||||
{{ range $paginator.Pages }}
|
||||
{{ if $truncate }}
|
||||
{{ .Render "summary" }}
|
||||
|
Reference in New Issue
Block a user