diff --git a/_includes/components/sections/featured-posts.njk b/_includes/components/sections/featured-posts.njk index 6fb8703..32e0d2d 100644 --- a/_includes/components/sections/featured-posts.njk +++ b/_includes/components/sections/featured-posts.njk @@ -247,5 +247,13 @@ {% endfor %} + + {% if collections.featuredPosts.length > maxItems %} +
+ {% endif %} {% endif %} diff --git a/featured.njk b/featured.njk new file mode 100644 index 0000000..760c84b --- /dev/null +++ b/featured.njk @@ -0,0 +1,186 @@ +--- +layout: layouts/base.njk +title: Featured +withSidebar: true +pagination: + data: collections.featuredPosts + size: 20 + alias: paginatedFeatured + generatePageOnEmptyData: true +permalink: "featured/{% if pagination.pageNumber > 0 %}page/{{ pagination.pageNumber + 1 }}/{% endif %}" +--- ++ Curated posts pinned as featured. + ({{ collections.featuredPosts.length }} total) +
+ + {% if paginatedFeatured.length > 0 %} +{{ post.templateContent | striptags | truncate(250) }}
+ {% endif %} + Read more → + + {% else %} + {# ── Note ── #} +