Skip to content

Commit 5ea51b6

Browse files
committed
enable toc for index page
1 parent b6353bf commit 5ea51b6

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

_config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ remote_theme: sighingnow/jekyll-gitbook
1818

1919
toc:
2020
enabled: true
21+
enabled_index: false
2122
h_min: 1
2223
h_max: 3
2324

_includes/toc-date.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,11 @@
3939
<a href="{{site.baseurl}}/" onclick="pageScrollToTop(this)">
4040
{{ site.title | escape }}
4141
</a>
42+
{% if site.toc.enabled %}
43+
{% if page.url == "/" and site.toc.enabled_index %}
44+
{% include toc.html html=content h_min=site.toc.h_min h_max=site.toc.h_max %}
45+
{% endif %}
46+
{% endif %}
4247
</li>
4348

4449
<li class="divider"></li>

0 commit comments

Comments
 (0)