Skip to content

Commit

Permalink
Add current build date to output
Browse files Browse the repository at this point in the history
  • Loading branch information
zachleat committed Mar 7, 2024
1 parent c37673b commit a2a22ed
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion _includes/layouts/base.njk
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,6 @@

<footer></footer>

<!-- Current page: {{ page.url | htmlBaseUrl }} -->
<!-- This page `{{ page.url | htmlBaseUrl }}` was built on {% currentBuildDate %} -->
</body>
</html>
4 changes: 4 additions & 0 deletions eleventy.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a2a22ed

Please sign in to comment.