diff --git a/layout/_widget/toc.ejs b/layout/_widget/toc.ejs index 2f36aab..9497cd1 100755 --- a/layout/_widget/toc.ejs +++ b/layout/_widget/toc.ejs @@ -1,9 +1,10 @@ <%- partial('_pre') %> -<% if(page.content && page.toc != false && toc(page.content).length > 0){ %> -
+<% var realcontent = (page.encrypt == true) ? page.origin : page.content; %> +<% if (realcontent && page.toc != false && toc(realcontent).length > 0) { %> +
style="display:none" <% } %>> <%- partial('header', {item: item}) %>
- <%- toc(page.content, {list_number: item.list_number, min_depth: item.min_depth, max_depth: item.max_depth}) %> + <%- toc(realcontent, {list_number: item.list_number, min_depth: item.min_depth, max_depth: item.max_depth}) %>
<% } %>