{% comment %} List of pages that were processed to HTML. Used for the pages menu. {% endcomment %} {% comment %} Descending order according to their position value. (Pages with higher number are on top of the list) {% endcomment %} {% assign reverse_list = site.html_pages | sort: 'menu_position' | reverse %} {% for current_page in reverse_list %} {% comment %} In order for a menu entry to be visible, 1) either a name for the menu entry or a page title must be available 2) the position parameter must be larger or equal to 0 (to hide entries, use a negative value) Pages that have not set the position parameter, will be placed to the end. {% endcomment %} {% assign label = current_page.menu_label | default: current_page.title %} {% assign position = current_page.menu_position | default: 0 %} {% if label and position >= 0 %} {% endif %} {% endfor %}