Skip to content

Commit 14298bb

Browse files
Multivit4mintmcw
authored andcommitted
fix: toc with children getting displayed as "note" (#1253)
1 parent b6901b4 commit 14298bb

File tree

2 files changed

+9
-11
lines changed

2 files changed

+9
-11
lines changed

src/default_theme/index._

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@
9595
</div>
9696
<div id='split-right' class='relative overflow-auto height-viewport-100'>
9797
<% docs.forEach(function(s) { %>
98-
<% if (s.kind === 'note') { %>
98+
<% if (s.kind === 'note' && !s.children) { %>
9999
<div class='keyline-top-not py2'><%=renderNote({ note: s })%></div>
100100
<% } else { %>
101101
<%= renderSection({

src/default_theme/note._

+8-10
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
1-
<% if (!note.children) { %>
2-
<section class='py2 clearfix'>
1+
<section class='py2 clearfix'>
32

4-
<h2 id='<%- slug(note.namespace) %>' class='mt0'>
5-
<%- note.name %>
6-
</h2>
3+
<h2 id='<%- slug(note.namespace) %>' class='mt0'>
4+
<%- note.name %>
5+
</h2>
76

8-
<% if (note.description) { %>
9-
<%= md(note.description) %>
10-
<% } %>
11-
</section>
12-
<% } %>
7+
<% if (note.description) { %>
8+
<%= md(note.description) %>
9+
<% } %>
10+
</section>

0 commit comments

Comments
 (0)