Skip to content

Commit

Permalink
post entries in home
Browse files Browse the repository at this point in the history
  • Loading branch information
Hamz-a committed May 7, 2023
1 parent a969093 commit a43b8b5
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions _layouts/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@

{{ content }}

<div class="entries-{{ page.entries_layout | default: 'list' }}">
{%- if site.plugins contains 'jekyll-paginate' and page.paginate or site.gems contains 'jekyll-paginate' and page.paginate -%}
{%- comment -%}
Add paginator.posts loop if jekyll-paginate plugin is enabled
and page.paginate == true
{%- endcomment -%}
{% include posts-paginated.html %}
{%- else -%}
{% include posts-limit.html %}
{%- endif -%}
</div>
{% assign postsByYear = site.posts | group_by_exp: 'post', 'post.date | date: "%Y"' %}
{% for year in postsByYear %}
<section id="{{ year.name }}" class="taxonomy-section">
<h2 class="taxonomy-title">{{ year.name }}</h2>
<div class="entries-{{ page.entries_layout | default: 'list' }}">
{% for entry in year.items %}
{% include entry.html %}
{% endfor %}
</div>
<a href="#page-title" class="back-to-top">{{ site.data.text[site.locale].back_to_top | default: 'Back to Top' }} &uarr;</a>
</section>
{% endfor %}

0 comments on commit a43b8b5

Please sign in to comment.