diff options
Diffstat (limited to 'plugins/base')
-rw-r--r-- | plugins/base/src/main/kotlin/renderers/PackageListService.kt | 2 | ||||
-rw-r--r-- | plugins/base/src/main/kotlin/renderers/preprocessors.kt | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/plugins/base/src/main/kotlin/renderers/PackageListService.kt b/plugins/base/src/main/kotlin/renderers/PackageListService.kt index 44769d9e..3d631f5c 100644 --- a/plugins/base/src/main/kotlin/renderers/PackageListService.kt +++ b/plugins/base/src/main/kotlin/renderers/PackageListService.kt @@ -21,7 +21,7 @@ class PackageListService(val context: DokkaContext) { fun visit(node: PageNode, parentDris: Set<DRI>) { - if (node is PackagePageNode) { + if (node is PackagePage) { node.name .takeUnless { name -> name.startsWith("[") && name.endsWith("]") } // Do not include the package name for declarations without one ?.let { packages.add(it) } diff --git a/plugins/base/src/main/kotlin/renderers/preprocessors.kt b/plugins/base/src/main/kotlin/renderers/preprocessors.kt index b07db2bd..42d0d3c4 100644 --- a/plugins/base/src/main/kotlin/renderers/preprocessors.kt +++ b/plugins/base/src/main/kotlin/renderers/preprocessors.kt @@ -11,17 +11,17 @@ object RootCreator : PageTransformer { } -class PackageListCreator(val context: DokkaContext, val format: LinkFormat) : PageTransformer { +class PackageListCreator(val context: DokkaContext, val format: LinkFormat, val fileName: String = "package-list") : PageTransformer { override fun invoke(input: RootPageNode) = input.modified(children = input.children.map { - it.takeUnless { it is ModulePageNode } + it.takeUnless { it is ModulePage } ?: it.modified(children = it.children + packageList(input)) // TODO packageList should take module as an input }) private fun packageList(pageNode: RootPageNode) = RendererSpecificResourcePage( - "${pageNode.name}/package-list", + "${pageNode.name}/${fileName}", emptyList(), RenderingStrategy.Write(PackageListService(context).formatPackageList(pageNode, format.formatName, format.linkExtension)) ) |