diff --git a/.eleventy.js b/.eleventy.js index 8cd043f..61f75dc 100644 --- a/.eleventy.js +++ b/.eleventy.js @@ -11,6 +11,25 @@ module.exports = function (eleventyConfig) { 'node_modules/simpledotcss/simple.css': 'css/simple.css', }); + eleventyConfig.addFilter("makeRfc822Date", function (value) { + return new Date(value).toUTCString(); + }); + eleventyConfig.addFilter("formatDatetimeForHumans", function (value) { + const dt = new Date(value); + const formattedDt = new Intl.DateTimeFormat("en", { + dateStyle: "medium", + timeStyle: "medium", + }).format(dt); + return formattedDt; + }); + eleventyConfig.addFilter("formatDateForHumans", function (value) { + const dt = new Date(value); + const formattedDt = new Intl.DateTimeFormat("en", { + dateStyle: "medium", + }).format(dt); + return formattedDt; + }); + const markdownLibrary = markdownIt() .use(markdownItAnchor, { slugify }) .use(