{% if paginator.previous_page %}
{% capture prev_url %}{{ paginator.previous_page_path | replace: '.html', '' }}{% endcapture -%}
{% else %}
{% endif %}
{% if paginator.next_page %}
{% capture next_url %}{{ paginator.next_page_path | replace: '.html', '' }}{% endcapture -%}
{% else %}
{% endif %}