From 89a9319cb75d8482c35ac97f9140456574635665 Mon Sep 17 00:00:00 2001
From: lauralani
Date: Sun, 4 Jun 2023 20:03:32 +0200
Subject: [PATCH] add last modified and copyright to page
---
.eleventy.js | 4 ++++
index.njk | 8 +++++++-
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/.eleventy.js b/.eleventy.js
index 891d16b..31d2267 100644
--- a/.eleventy.js
+++ b/.eleventy.js
@@ -10,6 +10,10 @@ module.exports = function(eleventyConfig) {
return DateTime.fromJSDate(value).toLocaleString(DateTime.DATETIME_FULL)
});
+ eleventyConfig.addFilter("copyrightyear", function() {
+ return DateTime.Now().toLocaleString({ year: 'numeric'})
+ });
+
return {
passthroughFileCopy: true
}
diff --git a/index.njk b/index.njk
index fc2baff..d0e3c78 100644
--- a/index.njk
+++ b/index.njk
@@ -2,6 +2,7 @@
layout: layouts/home.njk
title: "lauka.net"
eleventyExcludeFromCollections: true
+date: Last Modified
---
{{ title }}
@@ -50,6 +51,9 @@ eleventyExcludeFromCollections: true
that I already have worked on or that I want to work on in the future.