feat(toc): custom enable TOC in each post (#128)
This commit is contained in:
parent
1112288bd8
commit
b6e04e9153
|
@ -59,7 +59,7 @@
|
|||
<%- partial('_partial/side-tools') %>
|
||||
</div>
|
||||
|
||||
<% if (is_post() && theme.toc.enable === true) { %>
|
||||
<% if (is_post() && theme.toc.enable === true && page.toc !== false) { %>
|
||||
<aside class="page-aside">
|
||||
<%- partial('_partial/toc') %>
|
||||
</aside>
|
||||
|
|
|
@ -94,7 +94,8 @@ function initTOC() {
|
|||
KEEP.utils.registerSidebarTOC();
|
||||
|
||||
} else {
|
||||
KEEP.utils.pageContainer_dom.removeChild(document.querySelector('.page-aside'));
|
||||
const pageAsideDom = document.querySelector('.page-aside');
|
||||
pageAsideDom && KEEP.utils.pageContainer_dom.removeChild(pageAsideDom);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue