Fix toc again
This commit is contained in:
parent
eb83f82151
commit
630f9226ff
5
docs.py
5
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]
|
||||
|
@ -4,7 +4,7 @@
|
||||
<table class="nav">
|
||||
<tr>
|
||||
<td><a href="{{ROOT}}/">Contents</a></td>
|
||||
<td><a href="{{ROOT}}/intro/">Intro</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>
|
||||
|
Loading…
Reference in New Issue
Block a user