aboutsummaryrefslogtreecommitdiff
path: root/mkdocs/src/doc/docs/user_guide/plugins
diff options
context:
space:
mode:
authorIgnat Beresnev <ignat.beresnev@jetbrains.com>2023-01-10 13:14:43 +0100
committerGitHub <noreply@github.com>2023-01-10 13:14:43 +0100
commit7544a215fb580ae0c47d1f397334f150d1a1ec65 (patch)
treea30aa62c827e3ba88a498a7406ac57fa7334b270 /mkdocs/src/doc/docs/user_guide/plugins
parent2161c397e1b1aadcf3d39c8518258e9bdb2b431a (diff)
downloaddokka-7544a215fb580ae0c47d1f397334f150d1a1ec65.tar.gz
dokka-7544a215fb580ae0c47d1f397334f150d1a1ec65.tar.bz2
dokka-7544a215fb580ae0c47d1f397334f150d1a1ec65.zip
Revise documentation (#2728)
Co-authored-by: Sarah Haggarty <sarahhaggarty@users.noreply.github.com>
Diffstat (limited to 'mkdocs/src/doc/docs/user_guide/plugins')
-rw-r--r--mkdocs/src/doc/docs/user_guide/plugins/android-plugin.md8
-rw-r--r--mkdocs/src/doc/docs/user_guide/plugins/versioning-plugin.md86
2 files changed, 94 insertions, 0 deletions
diff --git a/mkdocs/src/doc/docs/user_guide/plugins/android-plugin.md b/mkdocs/src/doc/docs/user_guide/plugins/android-plugin.md
new file mode 100644
index 00000000..d52c2e5a
--- /dev/null
+++ b/mkdocs/src/doc/docs/user_guide/plugins/android-plugin.md
@@ -0,0 +1,8 @@
+# Android documentation plugin
+
+Android documentation plugin aims to improve the documentation on android platform.
+
+### Features:
+
+* `@hide` support - `@hide` javadoc tag is an equivalent of `@suppress` tag in kdoc. It hides certain entry from being
+ displayed in the documentation.
diff --git a/mkdocs/src/doc/docs/user_guide/plugins/versioning-plugin.md b/mkdocs/src/doc/docs/user_guide/plugins/versioning-plugin.md
new file mode 100644
index 00000000..876ec436
--- /dev/null
+++ b/mkdocs/src/doc/docs/user_guide/plugins/versioning-plugin.md
@@ -0,0 +1,86 @@
+# Versioning plugin
+
+Versioning plugin aims to provide users with ability to create a versioned documentation.
+Therefore, users of the documentation can view different versions of the documentation by going to the main page and change versions.
+
+Versioning can be configured using:
+
+* version - a string value representing a version that should be displayed in the dropdown.
+* olderVersionsDir - an optional file that represents the parent directory containing folders with previous Dokka outputs.
+* olderVersions - an optional list of directories, each containing a previous Dokka output. Used after the contents of
+ `olderVersionsDir`
+ (if it's specified).
+* versionsOrdering - an optional list of strings representing the ordering of versions that should be visible.
+ By default, Dokka will try to use semantic versioning to create such ordering.
+* renderVersionsNavigationOnAllPages - a bool value.
+ By default, Dokka renders a versions navigation on all pages.
+
+!!! note
+ You should enable the plugin in all submodules to render a versions navigation on all pages.
+
+Above configuration should be placed under the `pluginsConfiguration` block specific for your build tool.
+Configuration object is named `org.jetbrains.dokka.versioning.VersioningConfiguration`.
+
+
+### Directory structure required
+
+If you pass previous versions using `olderVersionsDir`, a particular directory structure is required:
+
+```
+.
+└── older_versions_dir
+ └── 1.4.10
+ ├── <dokka output>
+ └── 1.4.20
+ ├── <dokka output>
+ ...
+```
+
+As can be seen on the diagram, `olderVersionsDir` should be a parent directory of previous output directories.
+
+This can be avoided by manually specifying each past output directory with `olderVersions`, or they can be used
+together.
+
+`olderVersions` directories need to contain a past Dokka output. For the above example, you would pass
+`older_versions_dir/1.4.10, older_versions_dir/1.4.20`.
+
+!!! note
+ The previously documentations should be generated with the versioning plugin.
+
+### Example
+
+Versioning plugin in gradle can be configured in 2 ways:
+
+* by manually adding the versioning plugin to classpath and using `pluginsConfiguration`
+
+* by using `pluginsMapConfiguration` and adding the configuration serialized as json under the `org.jetbrains.dokka.versioning.VersioningPlugin` key.
+
+
+If you choose the first method the configuration may look like this:
+
+```kotlin
+buildscript {
+ dependencies {
+ classpath("org.jetbrains.dokka:versioning-plugin:<dokka_version>")
+ }
+}
+
+...
+
+pluginConfiguration<org.jetbrains.dokka.versioning.VersioningPlugin, org.jetbrains.dokka.versioning.VersioningConfiguration> {
+ version = "1.0"
+ olderVersionsDir = projectDir.resolve("olderVersionsDir")
+}
+```
+
+Alternatively, without adding plugin to classpath:
+
+```kotlin
+pluginsMapConfiguration.set(mapOf("org.jetbrains.dokka.versioning.VersioningPlugin" to """{ "version": "1.0" }"""))
+```
+
+Please consult the [Gradle documentation](../applying/gradle.md#applying-plugins) for more information about configuring Dokka with this build tool.
+
+Please see the [Dokka Gradle versioning multi modules example project](https://github.com/Kotlin/dokka/tree/master/examples/gradle/dokka-versioning-multimodule-example).
+
+Also see the [generated documentation](https://Kotlin.github.io/dokka/examples/dokka-versioning-multimodule-example/htmlMultiModule).