diff --git a/.knosys/sites/default/themes/nop-project/layout/_nop/components/doc-toc.ejs b/.knosys/sites/default/themes/nop-project/layout/_nop/components/doc-toc.ejs index a0b6679..76e2347 100644 --- a/.knosys/sites/default/themes/nop-project/layout/_nop/components/doc-toc.ejs +++ b/.knosys/sites/default/themes/nop-project/layout/_nop/components/doc-toc.ejs @@ -9,10 +9,7 @@ <% const _inc_docs = (site.data[`knosys/${repo}`] || {}).items %> <% const _inc_base_part = base || '' %> <% const _inc_base_url = `${_inc_site_url}${_inc_base_part}` %> - <% if (_inc_item.items) { %> - <%= _inc_item.text %> - <%- partial('_nop/components/doc-toc', { repo, items: _inc_item.items, base: _inc_base_part, collection: _inc_collection }) %> - <% } else { %> + <% if (customized ? _inc_item.slug !== undefined : !_inc_item.items) { %> <% const _inc_relative_url = page.path.replace('/index.html', '/').replace(base ? new RegExp(`^${_inc_base_part}`) : '', '') %> <% let _inc_item_url = `/${_inc_collection}/` %> <% let _inc_doc_url = `${_inc_base_url}/${_inc_collection}` %> @@ -23,6 +20,11 @@ <% _inc_doc_url = `${_inc_doc_url}/${_inc_item.slug}/` %> <% } %> class="is-selected"<% } %> href="<%= _inc_doc_url %>"><%= _inc_item.text %> + <% } else { %> + <%= _inc_item.text %> + <% } %> + <% if (_inc_item.items) { %> + <%- partial('_nop/components/doc-toc', { repo, items: _inc_item.items, base: _inc_base_part, collection: _inc_collection, customized }) %> <% } %> <% }) %> diff --git a/.knosys/sites/default/themes/nop-project/layout/_nop/layouts/doc.ejs b/.knosys/sites/default/themes/nop-project/layout/_nop/layouts/doc.ejs index dc89deb..b2fe328 100644 --- a/.knosys/sites/default/themes/nop-project/layout/_nop/layouts/doc.ejs +++ b/.knosys/sites/default/themes/nop-project/layout/_nop/layouts/doc.ejs @@ -4,7 +4,7 @@ <% if (repo && repo.toc) { %> <% } %>