Add current build date to output

This commit is contained in:
Zach Leatherman 2024-03-07 08:09:42 -06:00
parent c37673b2b9
commit a2a22ed195
2 changed files with 5 additions and 1 deletions

View File

@ -56,6 +56,6 @@
<footer></footer> <footer></footer>
<!-- Current page: {{ page.url | htmlBaseUrl }} --> <!-- This page `{{ page.url | htmlBaseUrl }}` was built on {% currentBuildDate %} -->
</body> </body>
</html> </html>

View File

@ -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) // Features to make your build faster (when you need them)
// If your passthrough copy gets heavy and cumbersome, add this line // If your passthrough copy gets heavy and cumbersome, add this line