{%- comment -%} Include as: {%- include components/breadcrumbs.html -%} Depends on: page, site. Results in: HTML for the breadcrumbs component. Overwrites: pages_list, parent_page, grandparent_page. {%- endcomment -%} {%- if page.url != "/" and page.parent -%} {%- assign pages_list = site[page.collection] | default: site.html_pages | where_exp: "item", "item.title != nil" | where_exp: "item", "item.has_children != nil" -%} {%- if page.grand_parent -%} {%- assign parent_page = pages_list | where: "title", page.parent | where: "parent", page.grand_parent | first -%} {%- assign grandparent_page = pages_list | where: "title", page.grand_parent | first -%} {%- else -%} {%- assign parent_page = pages_list | where: "title", page.parent | where_exp: "item", "item.parent == nil" | first -%} {%- endif -%} {%- endif -%}