CLOVIS
01/08/2025, 3:01 PMDokkaLocationProvider
implementation.
Currently, the documentation is generated using the human-readable module name:
dokkaContext.configuration.moduleName
which gives the output:
api/-my%20-example%20-module/package.name/Class.md
which isn't great for URLs.
Instead, I'd prefer to use the module's Gradle project name, to get something like:
api/my-example-module/package.name/Class.md
Is this possible? I don't see anything that looks like that in org.jetbrains.dokka.DokkaConfiguration
Adam Semenenko
01/13/2025, 10:59 AMclass Class
has a path of :api:my-example-module
. But it's strange that something is modifying it to add dashes and spaces, and then escaping the spaces! Does it happen in other output formats? I would dig around :dokka-subprojects:dokka-base
, I guess something in there is modifying it.CLOVIS
01/13/2025, 1:15 PMmoduleName
, not modulePath
. Admittedly, I don't really understand how a LocationProvider
should be written, so mine could be very wrong.
LocationProvider: https://gitlab.com/opensavvy/automation/dokka-material-mkdocs/-/blob/main/renderer[…]main/kotlin/location/MarkdownLocationProvider.kt?ref_type=heads
Config: https://gitlab.com/opensavvy/automation/dokka-material-mkdocs/-/blob/main/docs/example/example-core/build.gradle.kts?ref_type=heads#L15CLOVIS
01/13/2025, 1:17 PM./gradlew -p docs website:embedDokkaIntoMkDocs
then visit docs/website/docs/api
, you'll see all the module name contains spacesCLOVIS
01/13/2025, 1:18 PMCLOVIS
01/13/2025, 1:19 PM