{% assign docs = site.docs | where_exp: "doc", "doc.url contains '/step-by-step/'" %} {% for tutorial in tutorials %} {% assign tutorial_url = tutorial | prepend:"/tutorials/" | append:"/" %} {% if tutorial_url == page.url %}
{% if forloop.first %} Back {% else %} {% assign previous = forloop.index0 | minus: 1 %} {% assign previous_page = tutorials[previous] | prepend:"/tutorials/" | append:"/" %} {% endif %}
{% if forloop.last %} Next {% else %} {% assign next = forloop.index0 | plus: 1 %} {% assign next_page = tutorials[next] | prepend:"/tutorials/" | append:"/" %} {% endif %}
{% break %} {% endif %} {% endfor %} {% for doc in docs %} {% if doc.url == page.url %}
{% if forloop.first %} Back {% else %} {% assign previous = forloop.index0 | minus: 1 %} {% endif %}
{% if forloop.last %} Next {% else %} {% assign next = forloop.index0 | plus: 1 %} {% endif %}
{% break %} {% endif %} {% endfor %}
    {% for step in docs %}
  1. {{ step.title }}
  2. {% endfor %}