Skip to content

Commit

Permalink
current year
Browse files Browse the repository at this point in the history
  • Loading branch information
encse committed Dec 12, 2024
1 parent 594ba00 commit b9855d5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions docs/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ const filledRedirectTemplate = fillTemplate(redirectTemplate, {

fs.writeFileSync(path.join('build', 'index.html'), filledRedirectTemplate);

const currentYear = new Date().getFullYear();
// Iterate over readme.md files and print filled templates
for (const { year, day, name, notes, code, illustration } of findReadmes('.')) {
const filledHtml = fillTemplate(template, {
Expand All @@ -142,6 +143,7 @@ for (const { year, day, name, notes, code, illustration } of findReadmes('.')) {
'problem-name': `${name}`,
'year-picker': generateYearPicker(year,day, yearToDays),
'day-picker': generateDayPicker(year, day, yearToDays),
'current-year': `${currentYear}`,
notes,
code,
});
Expand Down
2 changes: 1 addition & 1 deletion docs/template.html
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ <h2 id="problem-name">{{problem-name}}</h2>

</div>
<div id="bottom">
<span>© <span id="currentYear"></span></span>
<span>© <span id="currentYear">{{current-year}}</span></span>
<span><a href="https://adventofcode.com">Advent of Code</a> is a registered trademark in the US</span>
<span>Images provided by <a href="https://www.bing.com/images/create">Bing</a> image creator</span>
</div>
Expand Down

0 comments on commit b9855d5

Please sign in to comment.