-
Notifications
You must be signed in to change notification settings - Fork 410
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix mkdocs documentation leading to non-stable versions (#2870)
Fixes #2869
- Loading branch information
1 parent
1fd0459
commit 1e10c6f
Showing
1 changed file
with
12 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} |