use dynamic path in recent posts section
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
{{ $currentNumOfrecentPosts := len (where .Site.RegularPages "Type" "posts") }}
|
||||
{{ $recentPostsPath := .Site.Params.footer.recentPosts.path | default "blogs" }}
|
||||
{{ $currentNumOfrecentPosts := len (where .Site.RegularPages "Type" $recentPostsPath) }}
|
||||
{{ if and (gt $currentNumOfrecentPosts 0) (.Site.Params.footer.recentPosts.enable | default false) }}
|
||||
<div class="container py-3" id="recent-posts">
|
||||
{{ $recentPostsPath := .Site.Params.footer.recentPosts.path | default "blogs" }}
|
||||
{{ $recentPostsCount := .Site.Params.footer.recentPosts.count | default 3 }}
|
||||
{{ $recentPosts := where .Site.RegularPages "Section" $recentPostsPath | first $recentPostsCount }}
|
||||
<div class="h3 text-center text-secondary py-3">
|
||||
|
||||
Reference in New Issue
Block a user