Skip to content

Commit f44c7bc

Browse files
committed
Keep other modules in sidebar
1 parent 8c0be67 commit f44c7bc

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

buildSrc/src/main/kotlin/dokka-convention.gradle.kts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,15 @@ tasks.register("trimNavigations") {
100100
// Trim side menus
101101
doc.select("div.sideMenu > div.toc--part")
102102
.filterNot { it.id().startsWith("$moduleName-nav-submenu") }
103-
.forEach { it.remove() }
103+
.forEach { moduleMenu ->
104+
val moduleRow = moduleMenu.select("div.toc--row").first()!!
105+
val toggleButton = moduleRow.select("button.toc--button").single()
106+
toggleButton.remove()
107+
108+
moduleMenu.children().filterNot { it == moduleRow }.forEach {
109+
it.remove()
110+
}
111+
}
104112

105113
// Update navigation.html
106114
val trimmedSideMenuParts = doc.select("div.sideMenu > div.toc--part")

0 commit comments

Comments
 (0)