Skip to content

Commit

Permalink
Fix mkdocs documentation leading to non-stable versions (#2870)
Browse files Browse the repository at this point in the history
Fixes #2869
  • Loading branch information
IgnatBeresnev authored Feb 17, 2023
1 parent 1fd0459 commit 1e10c6f
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions mkdocs/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -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
}

0 comments on commit 1e10c6f

Please sign in to comment.