From 7bf25f232569aa62edf1c88e7014a9f3c1b37014 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Thu, 20 Jul 2017 18:08:12 +0200 Subject: feat: Create feed handler for root --- src/domain/posts.js | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/domain') diff --git a/src/domain/posts.js b/src/domain/posts.js index 98488ba..ab35518 100644 --- a/src/domain/posts.js +++ b/src/domain/posts.js @@ -86,7 +86,9 @@ function taxonomise(taxonomies, posts) { module.exports = async function(config, getURL) { const posts = await getFolder(config.folder, getURL); const taxonomies = taxonomise(config.taxonomies, posts); + const lastPostDate = Math.max(Array.from(posts.values(), p => p.date)); return { + lastPostDate, posts, taxonomies, get -- cgit 1.4.1