<!--
    Iterate over all the pages in the site, where page_cursor holds the current
    page for each pass of the for loop.
    Note that page is the currently loaded page itself.
-->
{%- for path in page_paths -%}
  {%- assign page_cursor = site.pages | where: "path", path | first -%}
    {%- if page_cursor.title -%} {%- assign link_url = page_cursor.url | relative_url -%}
      {%- if page.category != nil and page.category == page_cursor.category -%}
        <!-- Category (page.category) is currently sel