Skip to content

Commit

Permalink
ktl-695 chore: support Dokka HTML customization
Browse files Browse the repository at this point in the history
  • Loading branch information
nikpachoo committed Aug 11, 2022
1 parent 16a85df commit cdc8f3f
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
4 changes: 4 additions & 0 deletions build.gradle
Expand Up @@ -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" }"""])
}
12 changes: 12 additions & 0 deletions 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.
2 changes: 2 additions & 0 deletions gradle/dokka.gradle
Expand Up @@ -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)
Expand Down

0 comments on commit cdc8f3f

Please sign in to comment.