{% comment %} The code below dynamically generates a sidebar nav of pages with `sidebar_link: true` in the front-matter. See readme for usage. {% endcomment %} {% assign pages_list = site.pages|sort:"sidebar_sort_order" %} {% for node in pages_list %} {% if node.title != null %} {% if node.sidebar_link %} {{ node.title }} {% endif %} {% endif %} {% endfor %}