-
-
Notifications
You must be signed in to change notification settings - Fork 52
0.3 Upgrade Guide
Toshimaru edited this page Jul 20, 2017
·
1 revision
As of 0.3, nested toc is supported. Please make sure your toc is not broken after update to 0.3.
If your post have the following heading structure:
# Heading.1
## Heading. 1-1
## Heading.1-2
# Heading.2
## Heading.2-1
### Heading.2-1-1
### Heading.2-1-2
## Heading.2-2
The structure generates the following HTML. All lists are flat.
<ul class="section-nav">
<li class="toc-entry toc-h1"><a href="#heading1">Heading.1</a></li>
<li class="toc-entry toc-h2"><a href="#heading1-1">Heading.1-1</a></li>
<li class="toc-entry toc-h2"><a href="#heading1-2">Heading.1-2</a></li>
<li class="toc-entry toc-h1"><a href="#heading2">Heading.2</a></li>
<li class="toc-entry toc-h2"><a href="#heading2-1">Heading.2-1</a></li>
<li class="toc-entry toc-h3"><a href="#heading2-1-1">Heading.2-1-1</a></li>
<li class="toc-entry toc-h3"><a href="#heading2-1-2">Heading.2-1-2</a></li>
<li class="toc-entry toc-h2"><a href="#heading2-2">Heading.2-2</a></li>
</ul>
The structure generates the following HTML. The lists are nested.
<ul class="section-nav">
<li class="toc-entry toc-h1"><a href="#heading1">Heading.1</a>
<ul>
<li class="toc-entry toc-h2"><a href="#heading1-1">Heading.1-1</a></li>
<li class="toc-entry toc-h2"><a href="#heading1-2">Heading.1-2</a></li>
</ul>
</li>
<li class="toc-entry toc-h1"><a href="#heading2">Heading.2</a>
<ul>
<li class="toc-entry toc-h2"><a href="#heading2-1">Heading.2-1</a>
<ul>
<li class="toc-entry toc-h3"><a href="#heading2-1-1">Heading.2-1-1</a></li>
<li class="toc-entry toc-h3"><a href="#heading2-1-2">Heading.2-1-2</a></li>
</ul>
</li>
<li class="toc-entry toc-h2"><a href="#heading2-2">Heading.2-2</a></li>
</ul>
</li>
</ul>