diff --git a/.eleventy.js b/.eleventy.js index 805097e..1b37f88 100644 --- a/.eleventy.js +++ b/.eleventy.js @@ -1,9 +1,17 @@ const eleventyNavigationPlugin = require('@11ty/eleventy-navigation') +const { DateTime } = require('luxon') + module.exports = function(eleventyConfig) { eleventyConfig.addPlugin(eleventyNavigationPlugin) eleventyConfig.addLayoutAlias('page', 'layouts/page') + eleventyConfig.addFilter('readableDate', dateObj => { + return DateTime.fromJSDate(dateObj, { + zone: "Europe/Paris", + }).setLocale('en').toLocaleString(DateTime.DATE_FULL) + }) + eleventyConfig.addNunjucksAsyncShortcode('image', require('./src/_11ty/imageShortcode').imageShortcode) /* Creating a collection of blogposts by filtering based on folder and filetype */