Przeglądaj źródła

website: Fix bug causing too few Recent Posts in sidebar

Kevin van Zonneveld 6 lat temu
rodzic
commit
1d4c9a5720
1 zmienionych plików z 3 dodań i 3 usunięć
  1. 3 3
      website/themes/uppy/layout/partials/blog.ejs

+ 3 - 3
website/themes/uppy/layout/partials/blog.ejs

@@ -22,14 +22,14 @@
             }
             seriesTracker[post.series]++
           }
-          totalCnt++
-
+          
           if (totalCnt > 10 || seriesTracker[post.series] > 1) {
             return false
           }
+          totalCnt++
         %>
           <li>
-              <a href="/<%- post.path %>" class="sidebar-link<%- page.title === post.title ? ' current' : '' %>"><%- title %></a>
+              <a href="/<%- post.path %>" class="sidebar-link<%- page.title === post.title || (page.series && page.series === post.series) ? ' current' : '' %>"><%- title %></a>
           </li>
       <% }) %>
       </ul>