From e32828f4063405d704717d5d638bc741bb512b25 Mon Sep 17 00:00:00 2001 From: Pavel Djundik Date: Tue, 6 Nov 2018 15:38:21 +0200 Subject: [PATCH] Mark guides/api links active when in sub pages Fixes #156 --- _includes/menu.html | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/_includes/menu.html b/_includes/menu.html index 918170b6..c86a227c 100644 --- a/_includes/menu.html +++ b/_includes/menu.html @@ -1,11 +1,13 @@ +{% assign current_path = page.url | split: '/' %} {% assign docs = (site.docs | sort: "order" ) %} {% for node in docs %} - {% assign level = (node.relative_path | split: '/' | size) %} - {% if level == 2 # Not a subfolder %} + {% assign path = node.url | split: '/' %} + {% assign level = path | size %} + {% if level == 3 # Not a subfolder %}
  • {{ node.title }}