From 5ba660d1eb0cd36306686eb4b0e284931894883d Mon Sep 17 00:00:00 2001 From: lauralani Date: Sun, 4 Jun 2023 20:35:05 +0200 Subject: [PATCH] try with new js --- .eleventy.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.eleventy.js b/.eleventy.js index 6d6652e..afd55c2 100644 --- a/.eleventy.js +++ b/.eleventy.js @@ -10,9 +10,7 @@ module.exports = function(eleventyConfig) { return DateTime.fromJSDate(value).toLocaleString(DateTime.DATETIME_FULL) }); - eleventyConfig.addFilter("copyrightyear", function() { - return DateTime.local().toFormat('y') - }); + eleventyConfig.addShortcode("copyrightyear", () => `${new Date().getFullYear()}`); return { passthroughFileCopy: true