Embed Kotlin and Java documentation in your Orchid site using Dokka.
Using Orchid with Dokka
The Orchid Kotlindoc plugin runs Dokka for you, using a formatter which outputs JSON. This makes it easy for Orchid to convert data generated by Dokka into something that is easily usable from Orchid. Just include the plugin, point it to the directories containing Kotlin or Java source files, and away you go!
The classes can reference pages in other Orchid sites' docs by adding their index JSON to your build. For example, you
can add https://orchid.netlify.com/meta/kotlindoc.index.json to your site's
config.yml so that your docs will link out to the Orchid doc pages. This works with class pages generated from either
the Javadoc or Kotlindoc plugins.
Orchid itself is written in Kotlin and documented with this Kotlindoc plugin. You can preview the generated documentation here.
This plugin delegates to Dokka to provide the documentation model. It will fetch the necessary jars and run Dokka using the command line, and you are able to add any additional arguments you wish.
First, you may specify the
--kotlindocClasspath flag to Orchid, which will forward this value to Dokka's
arg. Example usage when running Orchid from Gradle looks like the following:
In addition, you may specify a full list of args in your
config.yml which will be passed-through to Dokka.