diff --git a/build.gradle b/build.gradle index 236943b8b..0d21932ae 100644 --- a/build.gradle +++ b/build.gradle @@ -188,3 +188,7 @@ subprojects { apply from: rootProject.file('gradle/compiler-version.gradle') apply from: rootProject.file("gradle/dokka.gradle") apply from: rootProject.file("gradle/benchmark-parsing.gradle") + +tasks.named("dokkaHtmlMultiModule") { + pluginsMapConfiguration.set(["org.jetbrains.dokka.base.DokkaBase": """{ "templatesDir": "${projectDir.toString().replace('\\', '/')}/dokka-templates" }"""]) +} diff --git a/dokka-templates/README.md b/dokka-templates/README.md new file mode 100644 index 000000000..b08387c92 --- /dev/null +++ b/dokka-templates/README.md @@ -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 here +during the website build time on TeamCity. + +It is not practical to place these templates here 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://kotlin.github.io/dokka/1.7.20-SNAPSHOT/user_guide/output-formats/html/#custom-html-pages), you can +find more about the customization of Dokka's HTML output. \ No newline at end of file diff --git a/gradle/dokka.gradle b/gradle/dokka.gradle index 157ab82e5..bccf4fd71 100644 --- a/gradle/dokka.gradle +++ b/gradle/dokka.gradle @@ -20,6 +20,8 @@ subprojects { tasks.named('dokkaHtmlPartial') { outputDirectory = file("build/dokka") + pluginsMapConfiguration.set(["org.jetbrains.dokka.base.DokkaBase": """{ "templatesDir": "${rootProject.projectDir.toString().replace('\\', '/')}/dokka-templates" }"""]) + dokkaSourceSets { configureEach { includes.from(rootProject.file('dokka/moduledoc.md').path)