Skip to content

Commit

Permalink
feat(site-zh): support parent item clickable in user defined ToC
Browse files Browse the repository at this point in the history
  • Loading branch information
ourai committed Apr 11, 2024
1 parent 896c327 commit c243db3
Show file tree
Hide file tree
Showing 5 changed files with 110 additions and 522 deletions.
5 changes: 1 addition & 4 deletions .knosys/scripts/helper/nop-project.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,10 +149,7 @@ function generateProjectDocs(site, opts = {}) {
}

keys.forEach(key => execute('generate', site, key));

if (siteConfig.generator === 'hexo') {
setTimeout(() => resolveRepoData(site, siteConfig, repos));
}
setTimeout(() => resolveRepoData(site, siteConfig, repos));
}

module.exports = { resolveSiteSrcDir, generateProjectDocs };
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<% _inc_item_url = `${_inc_item_url}${_inc_item.slug}/` %>
<% _inc_doc_url = `${_inc_doc_url}/${_inc_item.slug}/` %>
<% } %>
<a data-re="<%= _inc_relative_url %>" data-uuu="<%= _inc_item_url %>"<% if (_inc_relative_url === _inc_item_url) { %> class="is-selected"<% } %> href="<%= _inc_doc_url %>"><%= _inc_item.text %></a>
<a<% if (_inc_relative_url === _inc_item_url) { %> class="is-selected"<% } %> href="<%= _inc_doc_url %>"><%= _inc_item.text %></a>
<% } else { %>
<span><%= _inc_item.text %></span>
<% } %>
Expand Down
Loading

0 comments on commit c243db3

Please sign in to comment.