Skip to content

Commit 57261a4

Browse files
authored
Refactor year handling in default layout
Updated year conditionals to include specific handling for 2025 and 2026.
1 parent df9b583 commit 57261a4

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

_layouts/default.html

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,13 @@
2424
<!-- Create variable containing year of the website -->
2525
{% assign year = page.url | slice: 1, 4 | times: 1 %}
2626

27-
<h1> {% year %}</h1>
2827
<!-- Include banner + navigation menu for 2025 and newer websites -->
29-
{% if year >= 2025 %}
28+
{% if year == 2025 %}
29+
{% assign fileName = "headers/" | append: year | append: ".html" %}
30+
{% include {{fileName}} %}
31+
{% endif %}
32+
33+
{% if year == 2026 %}
3034
{% assign fileName = "headers/" | append: year | append: ".html" %}
3135
{% include {{fileName}} %}
3236
{% endif %}

0 commit comments

Comments
 (0)