Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* Use of this source code is governed by the Apache 2.0 license that can be found in the LICENCE file.
*/

import org.jetbrains.dokka.gradle.DokkaMultiModuleTask
import org.jetbrains.dokka.gradle.DokkaTaskPartial
import java.net.URL

Expand All @@ -11,6 +12,14 @@ plugins {
}

tasks.withType<DokkaTaskPartial>().configureEach {
pluginsMapConfiguration.set(
mapOf(
"org.jetbrains.dokka.base.DokkaBase" to """{ "templatesDir" : "${
projectDir.resolveSibling("dokka-templates")
}"""
)
)

dokkaSourceSets.configureEach {
includes.from("Module.md")

Expand All @@ -34,3 +43,15 @@ tasks.withType<DokkaTaskPartial>().configureEach {
)
}
}

tasks.withType(DokkaMultiModuleTask::class.java) {
pluginsMapConfiguration.set(
mapOf(
"org.jetbrains.dokka.base.DokkaBase" to """{ "templatesDir" : "${
projectDir.resolve(
"dokka-templates"
)
}" }"""
)
)
}
12 changes: 12 additions & 0 deletions dokka-templates/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Dokka's template customization
To provide unified navigation for all parts of [kotlinlang.org](https://kotlinlang.org/),
the Kotlin Website Team uses this directory to place custom templates in this folder
during the website build time on TeamCity.

It is not practical to place these templates in the kotlinx.metadata repository because they change from time to time
and aren't related to the library's release cycle.

The folder is defined as a source for custom templates by the templatesDir property through Dokka's plugin configuration.

[Here](https://kotlinlang.org/docs/dokka-html.html#templates), you can
find more about the customization of Dokka's HTML output.