{%- assign default_paths = site.pages | map: "path" -%} {%- assign page_paths = site.header_pages | default: default_paths -%} {%- assign titles_size = site.pages | where_exp: 'page', 'page.title.size > 0' | size -%} {%- if page.layout == 'home' -%} {{ site.title }} {%- else -%} {{ site.title }} {%- endif -%} {%- if titles_size > 0 -%} ☰ {%- for path in page_paths -%} {%- assign header-link = site.pages | where: "path", path | first -%} {%- if header-link.title -%} {{ header-link.title | escape }} {%- endif -%} {%- endfor -%} {%- endif -%}