Skip to content

Commit

Permalink
ktl-695 chore: support Dokka HTML customization (Kotlin#3388)
Browse files Browse the repository at this point in the history
  • Loading branch information
nikpachoo authored and pablobaxter committed Sep 14, 2022
1 parent 541a179 commit 43ff6bb
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
4 changes: 4 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -355,3 +355,7 @@ allprojects { subProject ->
}
}
}

tasks.named("dokkaHtmlMultiModule") {
pluginsMapConfiguration.set(["org.jetbrains.dokka.base.DokkaBase": """{ "templatesDir": "${projectDir.toString().replace('\\', '/')}/dokka-templates" }"""])
}
4 changes: 4 additions & 0 deletions dokka-templates/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Customize Dokka's HTML.
To customize Dokka's HTML output, place a file in this folder.
Dokka will find a template file there. If the file is not found, a default one will be used.
This folder is defined by the templatesDir property.
2 changes: 2 additions & 0 deletions gradle/dokka.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ tasks.withType(DokkaTaskPartial::class).configureEach {

tasks.withType(DokkaTaskPartial::class).configureEach {
suppressInheritedMembers.set(true)
pluginsMapConfiguration.set(mapOf("org.jetbrains.dokka.base.DokkaBase" to """{ "templatesDir" : "${rootProject.projectDir.toString().replace('\\', '/')}/dokka-templates" }"""))

dokkaSourceSets.configureEach {
jdkVersion.set(11)
includes.from("README.md")
Expand Down

0 comments on commit 43ff6bb

Please sign in to comment.