← hugo-clarity

Fix unexpected posts in recent posts list issue

4bbf4e99ec8658ca42c4a4c541c0e855cf865471 · Luke Hong · Dec 19, 2023 16:28

Signed-off-by: Luke Hong <luke0724@hotmail.com>

+1 −1 · 1 file changed

  • layouts/partials/sidebar.html +1 −1
diff --git a/layouts/partials/sidebar.html b/layouts/partials/sidebar.html
index 17b18b2..d649615 100644
--- a/layouts/partials/sidebar.html
+++ b/layouts/partials/sidebar.html
@@ -72,7 +72,7 @@
     <h2 class="mt-4">{{ T "recent_posts" }}</h2>
     <ul class="flex-column">
       {{- $recent := default 8 $s.numberOfRecentPosts }}
-      {{- range first $recent $posts | symdiff $featuredPosts }}
+      {{- range first $recent ($posts | symdiff $featuredPosts) }}
       <li>
         <a href="{{ .Permalink }}" class="nav-link" title="{{ .Title }}">{{ .Title | markdownify }}</a>
       </li>