{% comment %} Dynamically generates a list of links to pages with `layout: page` in the front-matter, sorted alphabetically by URL. {% endcomment %} {% assign pages_list = site.pages | sort:"url" %} {% for node in pages_list %} {% if node.title != null %} {% if node.layout == "page" %} {{ node.title }} {% endif %} {% endif %} {% endfor %}