Skip to content

Commit

Permalink
[skip ci] Latest documentation version
Browse files Browse the repository at this point in the history
  • Loading branch information
anti-social committed Jul 8, 2022
1 parent 8ba3120 commit 75f1d15
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

Elasticsearch query DSL for Kotlin

Read [User Guide](https://anti-social.github.io/elasticmagic-kt/document/)
Read [User Guide](https://anti-social.github.io/elasticmagic-kt/latest/document/)

## Features

Expand Down
8 changes: 6 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -186,11 +186,15 @@ mkdocs {
// With strict it will fail because of 'api' directory is missing
strict = false

val isLatest = grgit.branch.current().name == "master" && docsVersion != "dev"
publish.apply {
docPath = docsVersion
rootRedirect = grgit.branch.current().name == "master" && docsVersion != "dev"
rootRedirectTo = docsVersion
rootRedirect = isLatest
generateVersionsFile = true
if (isLatest) {
rootRedirectTo = "latest"
setVersionAliases("latest")
}
}

extras = mapOf(
Expand Down

0 comments on commit 75f1d15

Please sign in to comment.