Fix routing
This commit is contained in:
parent
695cf61936
commit
24367d3a8c
4
docs.py
4
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)
|
||||
|
@ -3,11 +3,11 @@
|
||||
{% block rootbody %}
|
||||
<table class="nav">
|
||||
<tr>
|
||||
<td><a href="{{ROOT}}/sega/">Contents</a></td>
|
||||
<td><a href="{{ROOT}}/sega/intro/">Intro</a></td>
|
||||
<td><a href="{{ROOT}}/sega/software/">Software</a></td>
|
||||
<td><a href="{{ROOT}}/sega/hardware/">Hardware</a></td>
|
||||
<td><a href="{{ROOT}}/sega/manual/">Manual</a></td>
|
||||
<td><a href="{{ROOT}}/">Contents</a></td>
|
||||
<td><a href="{{ROOT}}/intro/">Intro</a></td>
|
||||
<td><a href="{{ROOT}}/software/">Software</a></td>
|
||||
<td><a href="{{ROOT}}/hardware/">Hardware</a></td>
|
||||
<td><a href="{{ROOT}}/manual/">Manual</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
{% block body %}{% endblock %}
|
||||
|
Loading…
Reference in New Issue
Block a user