aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgnat Beresnev <ignat.beresnev@jetbrains.com>2023-02-17 22:18:48 +0100
committerGitHub <noreply@github.com>2023-02-17 22:18:48 +0100
commit1e10c6f47d605e1e730cb58aa44f3051ec5a493b (patch)
tree5f14a5021e42cd809d264f765d8b259ee8f715a0
parent1fd045904e94d68878b3a5f748bf20f7c61a1cf7 (diff)
downloaddokka-1e10c6f47d605e1e730cb58aa44f3051ec5a493b.tar.gz
dokka-1e10c6f47d605e1e730cb58aa44f3051ec5a493b.tar.bz2
dokka-1e10c6f47d605e1e730cb58aa44f3051ec5a493b.zip
Fix mkdocs documentation leading to non-stable versions (#2870)
Fixes #2869
-rw-r--r--mkdocs/build.gradle.kts12
1 files changed, 12 insertions, 0 deletions
diff --git a/mkdocs/build.gradle.kts b/mkdocs/build.gradle.kts
index 1a93d550..b3c52a0a 100644
--- a/mkdocs/build.gradle.kts
+++ b/mkdocs/build.gradle.kts
@@ -1,3 +1,15 @@
+import org.jetbrains.dokkaVersionType
+import org.jetbrains.DokkaVersionType
+
plugins {
id("ru.vyarus.mkdocs") version "2.3.0"
}
+
+if (dokkaVersionType != DokkaVersionType.RELEASE) {
+ // Do not generate the root index.html file with the redirect
+ // to a non-release version, otherwise GitHub pages based documentation
+ // will always lead to the non-stable documentation.
+ // For more details, see https://github.com/Kotlin/dokka/issues/2869.
+ // For configuration details, see https://xvik.github.io/gradle-mkdocs-plugin/3.0.0/examples/#simple-multi-version.
+ mkdocs.publish.rootRedirect = false
+}