Skip to content

Commit 1e10c6f

Browse files
Fix mkdocs documentation leading to non-stable versions (#2870)
Fixes #2869
1 parent 1fd0459 commit 1e10c6f

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

mkdocs/build.gradle.kts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
import org.jetbrains.dokkaVersionType
2+
import org.jetbrains.DokkaVersionType
3+
14
plugins {
25
id("ru.vyarus.mkdocs") version "2.3.0"
36
}
7+
8+
if (dokkaVersionType != DokkaVersionType.RELEASE) {
9+
// Do not generate the root index.html file with the redirect
10+
// to a non-release version, otherwise GitHub pages based documentation
11+
// will always lead to the non-stable documentation.
12+
// For more details, see https://github.com/Kotlin/dokka/issues/2869.
13+
// For configuration details, see https://xvik.github.io/gradle-mkdocs-plugin/3.0.0/examples/#simple-multi-version.
14+
mkdocs.publish.rootRedirect = false
15+
}

0 commit comments

Comments
 (0)