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)
});
eleventyConfig.addFilter("copyrightyear", function() {
return DateTime.local().toFormat('y')
});
eleventyConfig.addShortcode("copyrightyear", () => `${new Date().getFullYear()}`);
return {
passthroughFileCopy: true