Add multi-level TOC to docs.html
This commit is contained in:
parent
ef9d6fb89e
commit
3c20d418c6
2 changed files with 16 additions and 2 deletions
|
@ -1,6 +1,9 @@
|
|||
---
|
||||
toc:
|
||||
install: Install
|
||||
install:
|
||||
_title: Install
|
||||
using-a-pre-bundled-release: Using a pre-bundled released
|
||||
composer: Composer
|
||||
run: Run
|
||||
---
|
||||
|
||||
|
|
13
docs.html
13
docs.html
|
@ -17,7 +17,18 @@ nav: 2
|
|||
{% for doc in site.docs %}
|
||||
{% for item in doc.toc %}
|
||||
<li>
|
||||
<a href="#{{ item[0] }}">{{ item[1] }}</a>
|
||||
{% if item[1]._title %}
|
||||
<a href="#{{ item[0] }}">{{ item[1]._title }}</a>
|
||||
<ul>
|
||||
{% for sub in item[1] %}
|
||||
{% if sub[0] != "_title" %}
|
||||
<li><a href="#{{ sub[0] }}">{{ sub[1] }}</a></li>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% else %}
|
||||
<a href="#{{ item[0] }}">{{ item[1] }}</a>
|
||||
{% endif %}
|
||||
</li>
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
|
|
Loading…
Add table
Reference in a new issue