File tree Expand file tree Collapse file tree 2 files changed +28
-0
lines changed
Expand file tree Collapse file tree 2 files changed +28
-0
lines changed Original file line number Diff line number Diff line change 2020 </div>
2121
2222 {%- for post in page.posts %}
23+
24+ {# Show year #}
25+ {%- set year %}
26+ {%- set post .year = date (post .date , ' YYYY' ) %}
27+
28+ {%- if post .year !== year %}
29+ {%- set year = post .year %}
30+ <div class =" collection-title" >
31+ <{%- if theme.seo %}h2{% else %}h1{%- endif %} class =" archive-year" id=" archive-year-{{ year }}" >{{ year }}</{%- if theme.seo %}h2{% else %}h1{%- endif %}>
32+ </div>
33+ {%- endif %}
34+ {# endshow #}
35+
2336 {{ post_template.render (post ) }}
37+
2438 {%- endfor %}
2539 </div>
2640
Original file line number Diff line number Diff line change 2020 </div>
2121
2222 {%- for post in page.posts %}
23+
24+ {# Show year #}
25+ {%- set year %}
26+ {%- set post .year = date (post .date , ' YYYY' ) %}
27+
28+ {%- if post .year !== year %}
29+ {%- set year = post .year %}
30+ <div class =" collection-title" >
31+ <{%- if theme.seo %}h2{% else %}h1{%- endif %} class =" archive-year" id=" archive-year-{{ year }}" >{{ year }}</{%- if theme.seo %}h2{% else %}h1{%- endif %}>
32+ </div>
33+ {%- endif %}
34+ {# endshow #}
35+
2336 {{ post_template.render (post ) }}
37+
2438 {%- endfor %}
2539 </div>
2640
You can’t perform that action at this time.
0 commit comments