diff --git a/_includes/nav.html b/_includes/nav.html
index 73b68c6..e044481 100644
--- a/_includes/nav.html
+++ b/_includes/nav.html
@@ -67,8 +67,10 @@
{% for item in nav %}
{% if item.url %}
+ {# Current page, or anything under the item's URL; "/" matches only the home page #}
+ {% set isActive = page.url == item.url or (item.url != '/' and page.url.indexOf(item.url) == 0 and (item.url.slice(-1) == '/' or page.url.charAt(item.url.length) == '/')) %}
-
-
+
{{ item.title }}