{% for p in site.pages %} {% unless p.title %} {% comment%} Only show pages that have a title. {% endcomment %} {% continue %} {% endunless %} {% assign _current = false %} {% if p.url == page.url %} {% assign _current = true %} {% endif %}
  • {{ p.title }} {% if _current and page.subnav %}
      {% include subnav.html links=page.subnav %}
    {% endif %}
  • {% endfor %}