From a3a4685819fee031ef19435427deb45c241a6a50 Mon Sep 17 00:00:00 2001 From: George Mandis Date: Thu, 28 Nov 2019 16:18:16 -0800 Subject: [PATCH] Added 'last updated' timestamp info --- src/index.js | 3 +++ src/template.html | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/src/index.js b/src/index.js index ba68511..87a3b7d 100644 --- a/src/index.js +++ b/src/index.js @@ -20,6 +20,9 @@ env.addFilter("formatDate", function(dateString) { return formattedDate !== 'Invalid Date' ? formattedDate : dateString; }); +const buildDate = new Date(); +env.addGlobal('now', `${buildDate.toLocaleDateString()} ${buildDate.toLocaleTimeString()}` ); + // parse XML or JSON feeds function parseFeed(response) { const contentType = response.headers.get("content-type") diff --git a/src/template.html b/src/template.html index f2e8bfc..0aa0d50 100644 --- a/src/template.html +++ b/src/template.html @@ -39,5 +39,10 @@ {% endfor %} {% endif %} + +
+

+ Last updated {{ now }}. Powered by Bubo Reader, a project by George Mandis +

\ No newline at end of file