From e67274c89727b274a7675a42e2a34f0eaf7ec0cb Mon Sep 17 00:00:00 2001 From: Ryan Nett Date: Wed, 5 May 2021 10:22:14 -0700 Subject: Add ability to specify older versions as a list of files (#1890) * Specify older versions as a list of files, add option to use directory * Allow specifying older version directory as well * Cleanup * Update API export * Update versioning docs --- docs/src/doc/docs/user_guide/versioning/versioning.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'docs/src') diff --git a/docs/src/doc/docs/user_guide/versioning/versioning.md b/docs/src/doc/docs/user_guide/versioning/versioning.md index 985fae56..7cb2a783 100644 --- a/docs/src/doc/docs/user_guide/versioning/versioning.md +++ b/docs/src/doc/docs/user_guide/versioning/versioning.md @@ -9,6 +9,9 @@ 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. @@ -21,7 +24,7 @@ Configuration object is named `org.jetbrains.dokka.versioning.VersioningConfigur ### Directory structure required -Versioning plugins requires documentation authors to keep previous outputs in a set structure: +If you pass previous versions using `olderVersionsDir`, a particular directory structure is required: ``` . @@ -35,6 +38,12 @@ Versioning plugins requires documentation authors to keep previous outputs in a 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`. + ### Example Versioning plugin in gradle can be configured in 2 ways: -- cgit