Skip to content

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

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

Merged
merged 1 commit into from
Aug 9, 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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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