feat: set automatic year for copyright on build time

pull/13/head
Nicolas Doby 2023-01-20 09:59:55 +01:00
parent eb04187362
commit 24f8c252ba
2 changed files with 5 additions and 1 deletions

View File

@ -49,6 +49,10 @@ module.exports = function(eleventyConfig) {
ul: true,
});
eleventyConfig.addShortcode('getYear', () => {
return new Date().getFullYear();
});
eleventyConfig.addFilter("env", (key, def="NOT DEFINED") => process.env[key] || def);
eleventyConfig.addFilter("readableDate", (dateObj, format = "dd LLLL yyyy") => {

View File

@ -47,7 +47,7 @@
<div class="footer-contact">
<div>
<p class="footer-contact-title">IT's on us</p>
<p>Copyright © 2022</p>
<p>Copyright © {% getYear %}</p>
</div>
<ul class="footer-links">
<li>