From a2a22ed1955b96c3c7afe4f57a3a49576bfb1e42 Mon Sep 17 00:00:00 2001 From: Zach Leatherman Date: Thu, 7 Mar 2024 08:09:42 -0600 Subject: [PATCH] Add current build date to output --- _includes/layouts/base.njk | 2 +- eleventy.config.js | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/_includes/layouts/base.njk b/_includes/layouts/base.njk index 3b3226fcc..ae7f5bd9e 100644 --- a/_includes/layouts/base.njk +++ b/_includes/layouts/base.njk @@ -56,6 +56,6 @@ - + diff --git a/eleventy.config.js b/eleventy.config.js index 3fba4b71b..9f57b679e 100644 --- a/eleventy.config.js +++ b/eleventy.config.js @@ -92,6 +92,10 @@ module.exports = function(eleventyConfig) { }); }); + eleventyConfig.addShortcode("currentBuildDate", () => { + return (new Date()).toISOString(); + }) + // Features to make your build faster (when you need them) // If your passthrough copy gets heavy and cumbersome, add this line