{% macro navitem(title, href, class="", target="", rel="") %} {%- if href is starting_with("/") or href is starting_with("https://") %} {% set path = href %} {% else %} {% set path = "/" ~ href %} {% endif -%} {%- set active = current_path and href == current_path or current_path and path == current_path or current_url and href == current_url -%}