dokka icon indicating copy to clipboard operation
dokka copied to clipboard

How can I document root level package?

Open raymondctc opened this issue 1 year ago • 1 comments

Question How can I document root level package? e.g. this component package doesn't contain any classes, but only other packages? image

I've defined in packages.md with the following:

# Package com.ninegag.android.app.component

`component` package is deprecated, don't add anything new to it

The dokka generated doesn't add this description to the root level of the package. If I would like to tell people that the .component package is deprecated, what is the best way to do so? Thank you

Screenshots If applicable, add screenshots to help explain your problem

Installation

  • Operating system: macOS/Windows/Linux
  • Build tool: Gradle v6.8.0/Maven/Cli/3rd party plugin
  • Dokka version: 1.4.30

Additional context Add any other context about the problem here

raymondctc avatar Sep 21 '22 18:09 raymondctc

Hi! You seem to be on the right path, but it's unclear whether you've added packages.md to includes configuration param.

If you look at kotlinx.coroutines, they have configured Dokka in the following way:

tasks.withType(DokkaTaskPartial::class).configureEach {
    ...
    dokkaSourceSets.configureEach {
        ...
        includes.from("README.md")
        ...
    }
}

And in the root of a module they have a README.md file with package descriptions, just like in the example you've provided:

# Package kotlinx.coroutines

General-purpose coroutine builders, contexts, and helper functions.

Which is then parsed by Dokka and you can see this description in generated documentation: 2022-09-29_14-08-37

Hopefully that's what you're missing and you're able to configure it. If not, let us know

IgnatBeresnev avatar Sep 29 '22 12:09 IgnatBeresnev

Closing the issue as stale, hopefully the issue has been resolved. Let us know if the question is still relevant

IgnatBeresnev avatar Nov 17 '22 04:11 IgnatBeresnev