SourceLinkMapItem

Configuration block that allows adding a source link to each signature which leads to path with a specific line number (configurable by setting lineSuffix), letting documentation readers find source code for each declaration.

Example:

<sourceLinks>
<link>
<path>${project.basedir}/src</path>
<url>https://github.com/kotlin/dokka/tree/master/src</url>
<lineSuffix>#L</lineSuffix>
</link>
</sourceLinks>

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
@Parameter(name = "lineSuffix")
var lineSuffix: String?

Suffix used to append source code line number to the URL. This will help readers navigate not only to the file, but to the specific line number of the declaration.

Link copied to clipboard
@Parameter(name = "path", required = true)
var path: String

Path to the local source directory. The path must be relative to the root of current project.

Link copied to clipboard
@Parameter(name = "url", required = true)
var url: String

URL of source code hosting service that can be accessed by documentation readers, like GitHub, GitLab, Bitbucket, etc. This URL will be used to generate source code links of declarations.