Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide a way for customization Dokka's HTML output #2008

Merged
merged 1 commit into from Aug 18, 2022
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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 in this folder
during the website build time on TeamCity.

It is not practical to place these templates in the kotlinx.serialization 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://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