<%= page.title %>
<% if (page.tldr || page.description) { -%>TL;DR — <%- page.tldr || page.description %>
<% } -%> <% if (page.readTime) { -%><% } -%> <% if (page.content) { -%> <%= page.readTime %>
--- title: Eric's Journal path: /journal/index.html --- <% const MAX_POSTS = 6; -%> <% const cwd = (process && process.cwd) ? process.cwd() : ''; -%> <% const titleLink = (site && site.base_uri) ? site.base_uri : '/'; -%> <%- include('../../layouts/partials/top') %>
Below you'll find some of my most recent Journal entries.
<% } -%>
<% if (site && site.pages) { -%>
<%
let
curr_post_num = 0,
pages = site.pages.sort((a, b) => {
if (a.date_pub && b.date_pub) {
let
a_dt = (new Date(a.date_pub)).getTime(),
b_dt = (new Date(b.date_pub)).getTime();
if (a_dt < b_dt) {
return 1;
}
if (b_dt < a_dt) {
return -1;
}
return 0;
}
});
-%>
<% pages.forEach(function(page) { -%>
<% if (page.content_type && page.content_type === 'journal' && curr_post_num < MAX_POSTS) { -%>
<% curr_post_num++; -%>
TL;DR — <%- page.tldr || page.description %>
<%= page.title %>
<% if (page.tldr || page.description) { -%>