diff --git a/_config.yml b/_config.yml index c53cddb55e1151dd686cd8a83f320e1818f548a9..daa9c4f2e1f5495c8af3a18f461476595a47f6ea 100644 --- a/_config.yml +++ b/_config.yml @@ -80,7 +80,7 @@ plugins: - 'jekyll-feed' - 'jekyll-sitemap' -paginate: 5 +paginate: 8 paginate_path: '/news/page:num/' markdown: kramdown diff --git a/_layouts/pagination.html b/_layouts/pagination.html index 39efaab9148e8b02d354498f4eea0c98c50f7711..454fbb70915b34a96e87586adb73e50a9c98fae4 100644 --- a/_layouts/pagination.html +++ b/_layouts/pagination.html @@ -94,6 +94,56 @@ title: HIFIS </article> {% endfor %} + + + {% if paginator.total_pages > 1 %} + <nav class="page-navigation grid-container"> + <div class="pagination-container grid-item"> + {% if paginator.previous_page %} + <span> + <a href="{{ paginator.previous_page_path | relative_url }}"> + <i class="fas fa-backward"></i> + </a> + </span> + {% endif %} + + {% for page in (1..paginator.total_pages) %} + {% if page == paginator.page %} + <span> {{ page }} </span> + {% elsif page == 1 %} + <span> + <a href="{{ 'news/' | relative_url }}"> {{ page }} </a> + </span> + {% else %} + <span> + <a href="{{ site.paginate_path + | relative_url + | replace: ':num', page }}"> + {{ page }} + </a> + </span> + {% endif %} + {% endfor %} + + {% if paginator.next_page %} + <span> + <a href="{{ paginator.next_page_path | relative_url }}"> + <i class="fas fa-forward"></i> + </a> + </span> + {% endif %} + </div> + <div class="rss-posts-container grid-item"> + <a class="rss-posts-button" href="{{ '/feed/news.xml' | relative_url }}" + title="subscribe to feed" + type="application/atom+xml" + download> + <i class="fas fa-rss"></i> + </a> + </div> + </nav> + {% endif %} + </section> </main>