{% paginate collections by 3 %}
{% for collection in collections reversed %}
{% if collection.template_suffix == 'hoge' %}
- {{ collection.title }}
{% endif %}
{% endfor %}
{%- if paginate.pages > 1 -%}
{% unless paginate.previous.is_link %}
-
{% else %}
- {% include 'icon-arrow-left' %}
{{ 'general.pagination.previous' | t }}
{% endunless %}
- {{ 'general.pagination.current_page' | t: current: paginate.current_page, total: paginate.pages }}
{% unless paginate.next.is_link %}
-
{% else %}
- {% include 'icon-arrow-right' %}
{{ 'general.pagination.next' | t }}
{% endunless %}
{%- endif -%}
{%- endpaginate -%}
{% endcomment %}
上記の方法でコードでページネーションはできたのですが表示順を新着順にする方法がわからず困っています。
また、テンプレートhoge以外のものも数に含まれており、空白のブロックができてしまいます。
原因がわからずに困っています。