Skip to content

Commit fc52cc1

Browse files
authored
fix:目录有关问题 (#931)
1 parent 54c9c59 commit fc52cc1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

layout/_widget/toc.ejs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
<%- partial('_pre') %>
22
<% var realcontent = (page.encrypt == true) ? page.origin : page.content; %>
3-
3+
<% if (realcontent && page.toc != false && toc(realcontent).length > 0) { %>
44
<section class="widget toc-wrapper <%- page.widget_platform %>" id="toc-div" <% if (page.encrypt == true) { %>style="display:none" <% } %>>
55
<%- partial('header', {item: item}) %>
66
<div class='content'>
77
<%- toc(realcontent, {list_number: item.list_number, min_depth: item.min_depth, max_depth: item.max_depth}) %>
88
</div>
99
</section>
10+
<% } %>

0 commit comments

Comments
 (0)