-
Notifications
You must be signed in to change notification settings - Fork 417
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generate README.md instead of index.md #333
Labels
enhancement
An issue for a feature or an overall improvement
format: gfm
An issue/PR related to Dokka's GFM output format
Comments
Right now it is not supported |
semoro
added
enhancement
An issue for a feature or an overall improvement
question
A user question, can be resolved if the question is answered/resolved
labels
Jul 16, 2018
This will do it: task dokkaKdoc(type: org.jetbrains.dokka.gradle.DokkaTask) {
outputFormat = 'gfm'
outputDirectory = "$buildDir/kdoc"
}
import java.nio.file.Files
import java.nio.file.Paths
import java.nio.file.StandardCopyOption
task createReadmeFiles(dependsOn: dokkaKdoc) {
doFirst {
Files.walk(Paths.get(dokkaKdoc.outputDirectory))
.filter { it.getFileName().toString().toLowerCase() == "index.md" }
.forEach {
try {
Files.copy(it, it.resolveSibling("README.md"), StandardCopyOption.REPLACE_EXISTING)
} catch (e) {
throw new RuntimeException(e)
}
}
}
} Just call createReadmeFiles instead of dokkaKdoc |
@semoro/ @msink will this feature be supported in a future release? |
IgnatBeresnev
added
format: gfm
An issue/PR related to Dokka's GFM output format
and removed
question
A user question, can be resolved if the question is answered/resolved
plugin idea
labels
Mar 14, 2023
You can register this task that renames
dokkaGfm {
outputDirectory.set(file("$rootDir/docs/"))
}
tasks.register('renameDokkaReadme') {
doLast {
file("$rootDir/docs/index.md").renameTo("$rootDir/docs/README.md")
}
}
tasks.dokkaGfm.finalizedBy renameDokkaReadme |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
enhancement
An issue for a feature or an overall improvement
format: gfm
An issue/PR related to Dokka's GFM output format
Is it possible to generate
README.md
instead ofindex.md
for each class, in github flavored markdown mode?The text was updated successfully, but these errors were encountered: