diff options
Diffstat (limited to 'plugins/all-module-page/src/main/kotlin/MultimoduleLocationProvider.kt')
-rw-r--r-- | plugins/all-module-page/src/main/kotlin/MultimoduleLocationProvider.kt | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/plugins/all-module-page/src/main/kotlin/MultimoduleLocationProvider.kt b/plugins/all-module-page/src/main/kotlin/MultimoduleLocationProvider.kt index 1e7fb60c..cb1eca7b 100644 --- a/plugins/all-module-page/src/main/kotlin/MultimoduleLocationProvider.kt +++ b/plugins/all-module-page/src/main/kotlin/MultimoduleLocationProvider.kt @@ -10,17 +10,16 @@ import org.jetbrains.dokka.pages.PageNode import org.jetbrains.dokka.pages.RootPageNode import org.jetbrains.dokka.plugability.DokkaContext -class MultimoduleLocationProvider(private val root: RootPageNode, context: DokkaContext) : DokkaBaseLocationProvider(root, context, ".html") { - - private val defaultLocationProvider = DokkaLocationProvider(root, context) +open class MultimoduleLocationProvider(private val root: RootPageNode, val context: DokkaContext, private val fileExtension: String = ".html") : DokkaBaseLocationProvider(root, context, fileExtension) { + protected open val defaultLocationProvider = DokkaLocationProvider(root, context) val paths = context.configuration.modules.map { it.name to it.relativePathToOutputDirectory }.toMap() override fun resolve(dri: DRI, sourceSets: Set<DisplaySourceSet>, context: PageNode?) = dri.takeIf { it.packageName == MULTIMODULE_PACKAGE_PLACEHOLDER }?.classNames?.let { paths[it] }?.let { - "$it/${identifierToFilename(dri.classNames.orEmpty())}/index.html" + "$it/${identifierToFilename(dri.classNames.orEmpty())}/index$fileExtension" } ?: defaultLocationProvider.resolve(dri, sourceSets, context) override fun resolve(node: PageNode, context: PageNode?, skipExtension: Boolean) = |