dokka
dokka copied to clipboard
Understanding LocationProvider
Question
I'm creating a custom renderer format for Dokka v2. At this stage, there are multiple issues I have that I believe come from my incorrect usage of LocationProvider.
You can find my implementation of LocationProvider here. It is largely inspired by the MarkdownLocationProvider from the official GFM format.
Problem 1
By default, the module header page is generated at the root of the generation. However, I require that the module page is called index.md inside the module's directory.
My code does place the module file where I intend, however it seems to break all links to and from module pages. For example, if you visit this page, you will see that all links within a module page are broken. However, all other links everywhere else (package pages, class pages, function pages…) properly link to their content.
Since I have written no other code specifically about modules, I believe this must happen because I have implemented the location provider incorrectly somehow.
Problem 2
In all generated documentation pages, the URLs contain the module display name instead of the module technical name.
For example, this page has the URL:
https://opensavvy.gitlab.io/ktmongo/docs/api/-kotlin%20-b-s-o-n%20%E2%80%A2%20-based%20on%20the%20official%20-mongo-d-b%20implementation/index.html
which contains the full module name Kotlin BSON • Based on the official MongoDB implementation. However, I would have expected the URL to only use the technical name:
https://opensavvy.gitlab.io/ktmongo/docs/api/bson-official/index.html
which is what the official Dokka formats do.
Installation
- Build tool: Gradle
- Dokka version: 2.0.0 in v2 mode
Additional context
Same issue in my tracker: #18