|
@@ -10,9 +10,26 @@
|
|
|
</a>
|
|
|
</h2>
|
|
|
<ul>
|
|
|
- <% site.posts.sort('date', -1).limit(10).each(function (post) { %>
|
|
|
+ <%
|
|
|
+ var seriesTracker = {}
|
|
|
+ var totalCnt = 0
|
|
|
+ site.posts.sort('date', -1).each(function (post) {
|
|
|
+ var title = post.title
|
|
|
+ if (post.series) {
|
|
|
+ var title = post.series
|
|
|
+ if (!seriesTracker[post.series]) {
|
|
|
+ seriesTracker[post.series] = 0
|
|
|
+ }
|
|
|
+ seriesTracker[post.series]++
|
|
|
+ }
|
|
|
+ totalCnt++
|
|
|
+
|
|
|
+ if (totalCnt > 10 || seriesTracker[post.series] > 1) {
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ %>
|
|
|
<li>
|
|
|
- <a href="/<%- post.path %>" class="sidebar-link<%- page.title === post.title ? ' current' : '' %>"><%- post.title %></a>
|
|
|
+ <a href="/<%- post.path %>" class="sidebar-link<%- page.title === post.title ? ' current' : '' %>"><%- title %></a>
|
|
|
</li>
|
|
|
<% }) %>
|
|
|
</ul>
|
|
@@ -22,9 +39,15 @@
|
|
|
|
|
|
<div class="Content js-Content with-sidebar">
|
|
|
<h1 style="text-align: center; margin-bottom:.5em">The <%- config.title %> Blog</h1>
|
|
|
- <% site.posts.sort('date', -1).each(function (post) { %>
|
|
|
+ <% site.posts.sort('date', -1).each(function (post) {
|
|
|
+ var title = post.title
|
|
|
+
|
|
|
+ if (post.series) {
|
|
|
+ title = post.series + ': ' + post.title
|
|
|
+ }
|
|
|
+ %>
|
|
|
<div class="post">
|
|
|
- <h2><a href="/<%- post.path %>"><%- post.title %></a></h2>
|
|
|
+ <h2><a href="/<%- post.path %>"><%- title %></a></h2>
|
|
|
<h4><%- post.date.format('MMM D[,] YYYY') %></h4>
|
|
|
<div><%- post.excerpt %></div>
|
|
|
<a href="/<%- post.path %>">Continue reading ...</a>
|