diff --git a/_includes/header.html b/_includes/header.html index e66aed342b..2226a72bbb 100644 --- a/_includes/header.html +++ b/_includes/header.html @@ -19,8 +19,20 @@ {% for item in site.data.navigation %} + {% if item.url %} + {% assign active_part = item.url %} + {% else %} + {% assign active_part = item.title | downcase %} + {% endif %} + + {% if page.url contains active_part %} + {% assign top_active_class = "active" %} + {% else %} + {% assign top_active_class = "" %} + {% endif %} + {% if item.subnav %} - + {{ item.title }} {% for group in item.subnav %} @@ -30,8 +42,7 @@ {% endif %} {% for item in group.items %} - - + {{ item.title }} {% endfor %} @@ -40,7 +51,7 @@ {% else %} - + {{ item.title }} {% endif %}