diff options
author | Marcin Aman <marcin.aman@gmail.com> | 2020-10-07 13:58:46 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-07 13:58:46 +0200 |
commit | e9f5da45c0fcfec5f7c150229301904d7915e090 (patch) | |
tree | c094b57b37fec4c901bbfaa508268d354a4dc4c8 /docs | |
parent | de6019337ae0e97e73db7fa9394e88ec2de4aeed (diff) | |
download | dokka-e9f5da45c0fcfec5f7c150229301904d7915e090.tar.gz dokka-e9f5da45c0fcfec5f7c150229301904d7915e090.tar.bz2 dokka-e9f5da45c0fcfec5f7c150229301904d7915e090.zip |
Make logo replaceable #1339 (#1488)
Diffstat (limited to 'docs')
-rw-r--r-- | docs/src/doc/docs/user_guide/base-specific/frontend.md | 29 | ||||
-rw-r--r-- | docs/src/doc/docs/user_guide/cli/usage.md | 1 | ||||
-rw-r--r-- | docs/src/doc/docs/user_guide/gradle/usage.md | 19 | ||||
-rw-r--r-- | docs/src/doc/docs/user_guide/maven/usage.md | 23 |
4 files changed, 72 insertions, 0 deletions
diff --git a/docs/src/doc/docs/user_guide/base-specific/frontend.md b/docs/src/doc/docs/user_guide/base-specific/frontend.md new file mode 100644 index 00000000..adeb38ad --- /dev/null +++ b/docs/src/doc/docs/user_guide/base-specific/frontend.md @@ -0,0 +1,29 @@ +# Configuration specific to HTML format + +## Modifying assets + +It is possible to change static assets that are used to generate dokka's HTML. +Currently, user can modify: + * customAssets + * customStyleSheets + +Every file provided in those values will be applied to **every** page. + +Dokka uses 3 stylesheets: +* `style.css` - main css file responsible for styling the page +* `jetbrains-mono.css` - fonts used across dokka +* `logo-styles.css` - logo styling + +User can choose to add or override those files. +Resources will be overridden when in `pluginConfiguration` block there is a resource with the same name. + +### Examples +In order to override a logo and style it accordingly a simple css file named `logo-styles.css` is needed: +```css +#logo { + background-image: url('https://upload.wikimedia.org/wikipedia/commons/9/9d/Ubuntu_logo.svg'); + /* other styles required to make your page pretty */ +} +``` + +For build system specific instructions please visit dedicated pages: [gradle](../gradle/usage.md#Applying plugins), [maven](../maven/usage.md#Applying plugins) and [cli](../cli/usage.md#Configuration options)
\ No newline at end of file diff --git a/docs/src/doc/docs/user_guide/cli/usage.md b/docs/src/doc/docs/user_guide/cli/usage.md index 9c73f8d3..e6bedf5e 100644 --- a/docs/src/doc/docs/user_guide/cli/usage.md +++ b/docs/src/doc/docs/user_guide/cli/usage.md @@ -14,6 +14,7 @@ Dokka supports the following command line arguments: * `-moduleName` - (required) - module name used as a part of source set ID when declaring dependent source sets * `-cacheRoot` - cache directory to enable package-list caching * `-pluginsClasspath` - artifacts with Dokka plugins, separated by `;`. At least `dokka-base` and all its dependencies must be added there + * `-pluginsConfiguration` - configuration for plugins in format fqPluginName=json^^fqPluginName=json... * `-offlineMode` - do not resolve package-lists online * `-failOnWarning` - throw an exception instead of a warning * `-globalPackageOptions` - per package options added to all source sets diff --git a/docs/src/doc/docs/user_guide/gradle/usage.md b/docs/src/doc/docs/user_guide/gradle/usage.md index 987bc4c0..e0f84e96 100644 --- a/docs/src/doc/docs/user_guide/gradle/usage.md +++ b/docs/src/doc/docs/user_guide/gradle/usage.md @@ -182,6 +182,10 @@ dokkaHtml { suppress.set(true) } } + // Configures a plugin separately from the global configuration + pluginConfiguration<PluginClass, ConfigurationClass>{ + // values + } } } ``` @@ -249,6 +253,21 @@ To generate the documentation, use the appropriate `dokka${format}` Gradle task: ./gradlew dokkaHtml ``` +Some plugins can be configured separately using a plugin class and configuration class. For example: + +```kotlin +pluginConfiguration<DokkaBase, DokkaBaseConfiguration> { + customAssets = listOf(file("<path to asset>")) + customStyleSheets = listOf(file("<path to custom stylesheet>")) +} +``` + +Keep in mind, that this only works when using a buildscript (with the configured plugin on classpath) since it is not possible to import plugin's class without it. + +If you don't want to use a buildscript or use Kotlin version lower than 1.3.50 you can achieve the same behaviour manually: +```kotlin +pluginsMapConfiguration.set(mapOf("<fully qualified plugin's name>" to """<json configuration>""")) +``` ## Android !!! important diff --git a/docs/src/doc/docs/user_guide/maven/usage.md b/docs/src/doc/docs/user_guide/maven/usage.md index a95b6629..812737fa 100644 --- a/docs/src/doc/docs/user_guide/maven/usage.md +++ b/docs/src/doc/docs/user_guide/maven/usage.md @@ -160,6 +160,14 @@ The available configuration options are shown below: <version>${dokka.version}</version> </plugin> </dokkaPlugins> + + <!-- Configures a plugin separately --> + <pluginsConfiguration> + <fullyQualifiedPluginName> + <!-- Configuration --> + </fullyQualifiedPluginName> + </pluginsConfiguration> + </configuration> </plugin> ``` @@ -192,6 +200,21 @@ You can add plugins inside the `dokkaPlugins` block: </plugin> ``` +Some plugins can be configured separately using plugin's fully qualified name. For example: + +```xml +<pluginsConfiguration> + <org.jetbrains.dokka.base.DokkaBase> + <customStyleSheets> + <customStyleSheet><!-- path to custom stylesheet --></customStyleSheet> + </customStyleSheets> + <customAssets> + <customAsset><!-- path to custom asset --></customAsset> + </customAssets> + </org.jetbrains.dokka.base.DokkaBase> +</pluginsConfiguration> +``` + ## Example project Please see the [Dokka Maven example project](https://github.com/JetBrains/kotlin-examples/tree/master/maven/dokka-maven-example) for an example. |