From 630f9226ff95602ae9dbd6ceabac8c8b0ba878fd Mon Sep 17 00:00:00 2001 From: Bottersnike Date: Tue, 30 May 2023 00:46:24 +0100 Subject: [PATCH] Fix toc again --- docs.py | 5 +++++ templates/sega.html | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/docs.py b/docs.py index f476879..7abd29d 100644 --- a/docs.py +++ b/docs.py @@ -135,6 +135,11 @@ def generate_toc(base, name, route, start=1): parts = route.strip("/").split("/") toc = CONTENTS + for i in PAGES_BASE.split("/")[1:]: + toc = toc[i] + + if parts == [""]: + parts = [] for i in parts: if i in toc: toc = toc[i] diff --git a/templates/sega.html b/templates/sega.html index 4f50018..cc5a8f7 100644 --- a/templates/sega.html +++ b/templates/sega.html @@ -4,7 +4,7 @@ - +