From 24367d3a8ca78148b63ad3408414da0c541e9cff Mon Sep 17 00:00:00 2001 From: Bottersnike Date: Tue, 30 May 2023 00:38:04 +0100 Subject: [PATCH] Fix routing --- docs.py | 4 +++- templates/sega.html | 10 +++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/docs.py b/docs.py index b848094..bf8e06d 100644 --- a/docs.py +++ b/docs.py @@ -224,7 +224,7 @@ def generate_footer(base, name, route): break if toc == CONTENTS and len(parts) == 1: - toc = toc[""] + toc = toc[PAGES_BASE.partition("/")[2]] if toc is None: siblings = None @@ -351,6 +351,8 @@ for base, _, files in os.walk(TEMPLATES + "/" + PAGES_BASE): if not route.startswith("/"): route = "/" + route + print([route, base, name]) + handler = handler(base, name, route) handler.__name__ == route app.add_url_rule(route, route, handler) diff --git a/templates/sega.html b/templates/sega.html index d5eb894..4f50018 100644 --- a/templates/sega.html +++ b/templates/sega.html @@ -3,11 +3,11 @@ {% block rootbody %} - - - - - + + + + + {% block body %}{% endblock %}