try with new js

This commit is contained in:
Adora Laura Kalb 2023-06-04 20:35:05 +02:00
parent 7284c04b60
commit 5ba660d1eb
Signed by: adoralaura
GPG key ID: 7A4552166FC8C056

View file

@ -10,9 +10,7 @@ module.exports = function(eleventyConfig) {
return DateTime.fromJSDate(value).toLocaleString(DateTime.DATETIME_FULL) return DateTime.fromJSDate(value).toLocaleString(DateTime.DATETIME_FULL)
}); });
eleventyConfig.addFilter("copyrightyear", function() { eleventyConfig.addShortcode("copyrightyear", () => `${new Date().getFullYear()}`);
return DateTime.local().toFormat('y')
});
return { return {
passthroughFileCopy: true passthroughFileCopy: true