{% assign posts = site.docs | sort: "sort_index" %} {% for post in posts %} {% if post.sort_index < page.sort_index %} {% assign prev_post = post %} {% endif %} {% if post.sort_index > page.sort_index %} {% assign next_post = post %} {% break %} {% endif %} {% endfor %} {% assign user_url = site.url | append: site.baseurl %} {% assign full_base_url = user_url | default: site.github.url %} {% if prev_post and prev_post.draft == false %}
Previous
{% endif %} {% if next_post and next_post.draft == false %}
Next
{% endif %}