diff --git a/.eleventy.js b/.eleventy.js index 4b9161b..1ef0d19 100644 --- a/.eleventy.js +++ b/.eleventy.js @@ -29,6 +29,10 @@ module.exports = function (eleventyConfig) { verbose: false }); + eleventyConfig.addFilter("dateString", (dateObj) => { + return new Date(dateObj).toISOString().split("T")[0]; + }); + eleventyConfig.addCollection("posts", async function (collection) { collection = await api.posts .browse({ @@ -52,7 +56,6 @@ module.exports = function (eleventyConfig) { // Bring featured post to the top of the list collection.sort((post, nextPost) => nextPost.featured - post.featured); - console.log(collection); return collection; }); } \ No newline at end of file diff --git a/_includes/layouts/default.njk b/_includes/layouts/default.njk index 90f3ed0..b97945e 100644 --- a/_includes/layouts/default.njk +++ b/_includes/layouts/default.njk @@ -12,6 +12,13 @@