From 75daf63d25490b34f7a53fe150b68d1eb3555d14 Mon Sep 17 00:00:00 2001 From: Alfred Lee Date: Fri, 10 Nov 2023 11:38:25 -0500 Subject: [PATCH] try to fix page tree --- _layouts/default.html | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/_layouts/default.html b/_layouts/default.html index 81fa6f1..0ef0843 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -41,14 +41,22 @@

BitCurator Environment

{% assign suffix = item.name | slice: -9, 6 %} {% capture item_anchor %}{{ item.title }}{% endcapture %} - {% if is_in_dir and item.dir == '/BitCurator%20Environment/' or item.dir == sub_dir %} + {% if is_in_subdir and item.dir != sub_dir %} + {% assign is_in_subdir = false %} + + {% endif %} + {% if is_in_dir and item.dir == '/BitCurator%20Environment/' %} {% assign is_in_dir = false %} {% endif %} {% if suffix == '-index' %} - {% assign is_in_dir = true %} - {% assign sub_dir = item.dir %} + {% if is_in_dir %} + {% assign is_in_subdir = true %} + {% assign sub_dir = item.dir | append: item.stem | append: "/" %} + {% else %} + {% assign is_in_dir = true %} + {% endif %}
  • {{ item_anchor }}