Fixes https://github.com/kaushalmodi/ox-hugo/issues/183.master
parent
850c10d063
commit
03fe85af36
3 changed files with 155 additions and 5 deletions
@ -0,0 +1,104 @@ |
||||
+++ |
||||
title = "TOC Local" |
||||
tags = ["keyword", "toc", "local"] |
||||
draft = false |
||||
+++ |
||||
|
||||
Below, TOC is exported with only level-1 headings in this post. |
||||
|
||||
<div class="ox-hugo-toc toc"> |
||||
<div></div> |
||||
|
||||
<div class="heading">Table of Contents</div> |
||||
|
||||
- [Post sub-heading 1](#post-sub-heading-1) |
||||
- [Post sub-heading 2](#post-sub-heading-2) |
||||
- [Post sub-heading 3](#post-sub-heading-3) |
||||
|
||||
</div> |
||||
<!--endtoc--> |
||||
|
||||
|
||||
## Post sub-heading 1 {#post-sub-heading-1} |
||||
|
||||
Below, TOC is exported with only level-1 headings **relative to** this |
||||
"Post sub-heading 1" section. |
||||
|
||||
<div class="ox-hugo-toc toc local level-2"> |
||||
<div></div> |
||||
|
||||
- [Post sub-heading 1.1](#post-sub-heading-1-dot-1) |
||||
- [Post sub-heading 1.2](#post-sub-heading-1-dot-2) |
||||
- [Post sub-heading 1.3](#post-sub-heading-1-dot-3) |
||||
|
||||
</div> |
||||
<!--endtoc--> |
||||
|
||||
|
||||
### Post sub-heading 1.1 {#post-sub-heading-1-dot-1} |
||||
|
||||
|
||||
#### Post sub-heading 1.1.1 {#post-sub-heading-1-dot-1-dot-1} |
||||
|
||||
|
||||
### Post sub-heading 1.2 {#post-sub-heading-1-dot-2} |
||||
|
||||
|
||||
### Post sub-heading 1.3 {#post-sub-heading-1-dot-3} |
||||
|
||||
|
||||
## Post sub-heading 2 {#post-sub-heading-2} |
||||
|
||||
|
||||
### Post sub-heading 2.1 {#post-sub-heading-2-dot-1} |
||||
|
||||
|
||||
### Post sub-heading 2.2 {#post-sub-heading-2-dot-2} |
||||
|
||||
Below, TOC is exported with only up to level-2 headings **relative to** |
||||
this "Post sub-heading 2.2" section. |
||||
|
||||
<div class="ox-hugo-toc toc local level-3"> |
||||
<div></div> |
||||
|
||||
- [Post sub-heading 2.2.1](#post-sub-heading-2-dot-2-dot-1) |
||||
- [Post sub-heading 2.2.2](#post-sub-heading-2-dot-2-dot-2) |
||||
- [Post sub-heading 2.2.3](#post-sub-heading-2-dot-2-dot-3) |
||||
- [Post sub-heading 2.2.3.1](#post-sub-heading-2-dot-2-dot-3-dot-1) |
||||
- [Post sub-heading 2.2.3.2](#post-sub-heading-2-dot-2-dot-3-dot-2) |
||||
|
||||
</div> |
||||
<!--endtoc--> |
||||
|
||||
|
||||
#### Post sub-heading 2.2.1 {#post-sub-heading-2-dot-2-dot-1} |
||||
|
||||
|
||||
#### Post sub-heading 2.2.2 {#post-sub-heading-2-dot-2-dot-2} |
||||
|
||||
|
||||
#### Post sub-heading 2.2.3 {#post-sub-heading-2-dot-2-dot-3} |
||||
|
||||
Below, TOC is exported with only level-1 headings **relative to** this |
||||
"Post sub-heading 2.2.3" section. |
||||
|
||||
<div class="ox-hugo-toc toc local level-4"> |
||||
<div></div> |
||||
|
||||
- [Post sub-heading 2.2.3.1](#post-sub-heading-2-dot-2-dot-3-dot-1) |
||||
- [Post sub-heading 2.2.3.2](#post-sub-heading-2-dot-2-dot-3-dot-2) |
||||
|
||||
</div> |
||||
<!--endtoc--> |
||||
|
||||
|
||||
##### Post sub-heading 2.2.3.1 {#post-sub-heading-2-dot-2-dot-3-dot-1} |
||||
|
||||
|
||||
##### Post sub-heading 2.2.3.2 {#post-sub-heading-2-dot-2-dot-3-dot-2} |
||||
|
||||
|
||||
## Post sub-heading 3 {#post-sub-heading-3} |
||||
|
||||
|
||||
### Post sub-heading 3.1 {#post-sub-heading-3-dot-1} |
||||
Loading…
Reference in new issue