title: How can I remove the previous and next links on the first and last pages in Stacey v3 with Twig?
body: <p>I'm editing the <code>project.html</code> template in Stacey v3, there's next and previous links generated by:</p>
  
  <p><code>{% include 'partials/next-page.html' %}</code></p>
  
  <p>and</p>
  
  <p><code>{% include 'partials/previous-page.html' %}</code></p>
  
  <p>In <code>next-page.html</code>:</p>
  
  <pre><code>{% for sibling in page.next_sibling %}
    &lt;li&gt;&lt;a href="{{ sibling.url }}" title="{{ sibling.title }}"&gt;Next project&lt;/a&gt;: &amp;rarr; {{ sibling.title }}&lt;/li&gt;
  {% endfor %}
  </code></pre>
  
  <p>And in <code>previous-page.html</code>:</p>
  
  <pre><code>{% for sibling in page.previous_sibling %}
    &lt;li&gt;&lt;a href="{{ sibling.url }}" title="{{ sibling.title }}"&gt;Previous project&lt;/a&gt;: &amp;larr; {{ sibling.title }}&lt;/li&gt;
  {% endfor %}
  </code></pre>
  
  <p>They work fine, they do their job, the issue for me is on the first project page it has a link to a previous page like <code>&lt;li&gt;&lt;a href="" title=""&gt;Previous project&lt;/a&gt;: ← &lt;/li&gt;</code>, which goes nowhere.</p>
  
  <p>On the last page of the projects it creates <code>&lt;li&gt;&lt;a href="" title=""&gt;Next project&lt;/a&gt;: → &lt;/li&gt;</code></p>
  
  <p>These dead links I don't want, they're misleading and pointless.</p>
  
  <p>So I'm trying to get rid of them with the logic of, if its the first page, don't generate the previous link, and on the last page don't generate a next link.</p>
  
  <p>I had tried something like this:</p>
  
  <pre><code>{% for sibling in page.siblings %}
      {% if loop.first == False %}
          Nothing should be generated
              {% else %}
          {% include 'partials/next-page.html' %}
      {% endif %}
  {% endfor %}
  </code></pre>
  
  <p>Which doesn't work, nor is my understanding of the logic sound.</p>