Skip to content

Commit

Permalink
update: kotlinlang Writerside migration
Browse files Browse the repository at this point in the history
  • Loading branch information
Quattro8 authored Sep 25, 2024
1 parent 8810d11 commit c9c52bd
Show file tree
Hide file tree
Showing 11 changed files with 58 additions and 72 deletions.
4 changes: 2 additions & 2 deletions docs/cfg/buildprofiles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
~ Copyright 2014-2024 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
-->

<buildprofiles>
<buildprofiles xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://resources.jetbrains.com/writerside/1.0/build-profiles.xsd">
<variables>
<enable-browser-edits>true</enable-browser-edits>
<browser-edits-url>https://github.com/Kotlin/dokka/edit/master/docs/</browser-edits-url>
<allow-indexable-eaps>true</allow-indexable-eaps>
</variables>
<build-profile product="kl"/>
<build-profile instance="dokka"/>
</buildprofiles>
45 changes: 20 additions & 25 deletions docs/dokka.tree
Original file line number Diff line number Diff line change
@@ -1,25 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE product-profile
SYSTEM "https://resources.jetbrains.com/stardust/product-profile.dtd">

<product-profile id="kl"
name="dokka"
start-page="dokka-introduction.md">

<chunk include-id="dokka">
<toc-element id="dokka-introduction.md"/>
<toc-element id="dokka-get-started.md"/>
<toc-element toc-title="Run Dokka">
<toc-element id="dokka-gradle.md"/>
<toc-element id="dokka-maven.md"/>
<toc-element id="dokka-cli.md"/>
</toc-element>
<toc-element toc-title="Output formats">
<toc-element id="dokka-html.md"/>
<toc-element id="dokka-markdown.md"/>
<toc-element id="dokka-javadoc.md"/>
</toc-element>
<toc-element id="dokka-plugins.md"/>
<toc-element toc-title="Module documentation" id="dokka-module-and-package-docs.md"/>
</chunk>
</product-profile>
<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE instance-profile SYSTEM "https://resources.jetbrains.com/writerside/1.0/product-profile.dtd">
<instance-profile id="dokka" name="dokka" start-page="dokka-introduction.md">
<snippet id="dokka">
<toc-element topic="dokka-introduction.md"/>
<toc-element topic="dokka-get-started.md"/>
<toc-element toc-title="Run Dokka">
<toc-element topic="dokka-gradle.md"/>
<toc-element topic="dokka-maven.md"/>
<toc-element topic="dokka-cli.md"/>
</toc-element>
<toc-element toc-title="Output formats">
<toc-element topic="dokka-html.md"/>
<toc-element topic="dokka-markdown.md"/>
<toc-element topic="dokka-javadoc.md"/>
</toc-element>
<toc-element topic="dokka-plugins.md"/>
<toc-element topic="dokka-module-and-package-docs.md"/>
</snippet>
</instance-profile>
13 changes: 0 additions & 13 deletions docs/project.ihp

This file was deleted.

6 changes: 3 additions & 3 deletions docs/topics/dokka-plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ From there, the plugin extends Dokka by itself - no further action is needed.
>
> If you notice problems like this, it's a good idea to check which plugins are applied and what they do.
>
{type="note"}
{style="note"}

Let's have a look at how you can apply the [mathjax plugin](https://github.com/Kotlin/dokka/tree/%dokkaVersion%/dokka-subprojects/plugin-mathjax)
to your project:
Expand All @@ -49,7 +49,7 @@ dependencies {
> When documenting [multi-project](dokka-gradle.md#multi-project-builds) builds, you need to apply Dokka plugins within
> subprojects as well as in their parent project.
>
{type="note"}
{style="note"}

</tab>
<tab title="Groovy" group-key="groovy">
Expand All @@ -73,7 +73,7 @@ dependencies {
> When documenting [multi-project](dokka-gradle.md#multi-project-builds) builds, you need to apply Dokka plugins within
> subprojects as well as in their parent project.
>
{type="note"}
{style="note"}

</tab>
<tab title="Maven" group-key="mvn">
Expand Down
2 changes: 1 addition & 1 deletion docs/topics/formats/dokka-html.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ your build tool or runner:
>
> Locally, you can use the [built-in IntelliJ web server](https://www.jetbrains.com/help/idea/php-built-in-web-server.html).
>
{type="note"}
{style="note"}

## Configuration

Expand Down
4 changes: 2 additions & 2 deletions docs/topics/formats/dokka-javadoc.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
> Successful integration with tools that accept Java's Javadoc HTML as input is not guaranteed.
> **You use it at your own risk.**
>
{type="warning"}
{style="warning"}

Dokka's Javadoc output format is a lookalike of Java's
[Javadoc HTML format](https://docs.oracle.com/en/java/javase/19/docs/api/index.html).
Expand All @@ -25,7 +25,7 @@ It is open source and you can find the source code on [GitHub](https://github.co

> The Javadoc format does not support multiplatform projects.
>
{type="warning"}
{style="warning"}


<tabs group="build-script">
Expand Down
2 changes: 1 addition & 1 deletion docs/topics/formats/dokka-markdown.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
> The Markdown output formats are still in Alpha, so you may find bugs and experience migration issues when using them.
> **You use them at your own risk.**
>
{type="warning"}
{style="warning"}

Dokka is able to generate documentation in [GitHub Flavored](#gfm) and [Jekyll](#jekyll) compatible Markdown.

Expand Down
11 changes: 3 additions & 8 deletions docs/topics/runners/dokka-cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,6 @@ with [all configuration options](#complete-configuration) applied at the bottom
</def>
<def title="suppressObviousFunctions">
<p>Whether to suppress obvious functions.</p>
<p>
A function is considered to be obvious if it is:
<list>
<li>
Expand All @@ -282,7 +281,6 @@ with [all configuration options](#complete-configuration) applied at the bottom
<code>dataClass.componentN</code> or <code>dataClass.copy</code>.
</li>
</list>
</p>
<p>Default: <code>true</code></p>
</def>
<def title="suppressInheritedMembers">
Expand Down Expand Up @@ -425,15 +423,14 @@ How to configure Kotlin
</p>
<p>This can be configured on per-package basis.</p>
<p>
Possible values:
Possible values:</p>
<list>
<li><code>PUBLIC</code></li>
<li><code>PRIVATE</code></li>
<li><code>PROTECTED</code></li>
<li><code>INTERNAL</code></li>
<li><code>PACKAGE</code></li>
</list>
</p>
<p>Default: <code>PUBLIC</code></p>
</def>
<def title="reportUndocumented">
Expand Down Expand Up @@ -510,14 +507,13 @@ How to configure Kotlin
<a href="https://kotlinlang.org/docs/kotlin-doc.html#sample-identifier">@sample</a> environment.
</p>
<p>
Possible values:
Possible values:</p>
<list>
<li><code>jvm</code></li>
<li><code>common</code></li>
<li><code>js</code></li>
<li><code>native</code></li>
</list>
</p>
</def>
<def title="sourceRoots">
<p>
Expand Down Expand Up @@ -601,13 +597,12 @@ You can configure source links for all source sets together at the same time, or
is <code>#L10</code>.
</p>
<p>
Suffixes used by popular services:
Suffixes used by popular services:</p>
<list>
<li>GitHub: <code>#L</code></li>
<li>GitLab: <code>#L</code></li>
<li>Bitbucket: <code>#lines-</code></li>
</list>
</p>
<p>Default: empty (no suffix)</p>
</def>
</deflist>
Expand Down
20 changes: 9 additions & 11 deletions docs/topics/runners/dokka-gradle.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,14 @@ See [Configuration examples](#configuration-examples) if you are not sure where
> for which documentation is to be generated. Make sure to apply the Kotlin Gradle Plugin or
> [configure source sets](#source-set-configuration) manually.
>
{type="note"}
{style="note"}

> If you are using Dokka in a
> [precompiled script plugin](https://docs.gradle.org/current/userguide/custom_plugins.html#sec:precompiled_plugins),
> you need to add the [Kotlin Gradle plugin](https://kotlinlang.org/docs/gradle-configure-project.html#apply-the-plugin)
> as a dependency for it to work properly.
>
{type="note"}
{style="note"}

If you cannot use the plugins DSL for some reason, you can use
[the legacy method](https://docs.gradle.org/current/userguide/plugins.html#sec:old_plugin_application) of applying
Expand Down Expand Up @@ -133,7 +133,7 @@ Dokka creates the following tasks for **parent** projects automatically:
> The [Javadoc](dokka-javadoc.md) output format does not have a `MultiModule` task, but a [`Collector`](#collector-tasks) task can
> be used instead.
>
{type="note"}
{style="note"}

By default, you can find ready-to-use documentation under `{parentProject}/build/dokka/{format}MultiModule` directory.

Expand Down Expand Up @@ -173,7 +173,7 @@ build that contains all declarations from the subprojects.

> Use the `dokkaJavadocCollector` task if you need to create Javadoc documentation for your multi-project build.
>
{type="tip"}
{style="tip"}

#### Collector results

Expand Down Expand Up @@ -210,12 +210,12 @@ However, you can [configure](#subproject-configuration) `Partial` tasks to custo
> Output generated by `Partial` tasks contains unresolved HTML templates and references, so it cannot be used
> on its own without post-processing done by the parent's [`MultiModule`](#multimodule-tasks) task.
>
{type="warning"}
{style="warning"}

> If you want to generate documentation for a single subproject only, use
> [single-project tasks](#single-project-builds). For example, `:subprojectName:dokkaHtml`.
>
{type="note"}
{style="note"}

## Build javadoc.jar

Expand Down Expand Up @@ -271,7 +271,7 @@ tasks.register('dokkaJavadocJar', Jar.class) {
> from the `javadoc.jar`. It works well with the HTML format as demonstrated in
> [this example](https://javadoc.io/doc/com.trib3/server/latest/index.html).
>
{type="tip"}
{style="tip"}

## Configuration examples

Expand Down Expand Up @@ -763,7 +763,7 @@ tasks.withType(DokkaTask.class) {
<def title="suppressObviousFunctions">
<p>Whether to suppress obvious functions.</p>
<p>
A function is considered to be obvious if it is:
A function is considered to be obvious if it is:</p>
<list>
<li>
Inherited from <code>kotlin.Any</code>, <code>Kotlin.Enum</code>, <code>java.lang.Object</code> or
Expand All @@ -774,7 +774,6 @@ tasks.withType(DokkaTask.class) {
<code>dataClass.componentN</code> or <code>dataClass.copy</code>.
</li>
</list>
</p>
<p>Default: <code>true</code></p>
</def>
<def title="suppressInheritedMembers">
Expand Down Expand Up @@ -1168,13 +1167,12 @@ tasks.withType(DokkaTask.class) {
is <code>#L10</code>.
</p>
<p>
Suffixes used by popular services:
Suffixes used by popular services:</p>
<list>
<li>GitHub: <code>#L</code></li>
<li>GitLab: <code>#L</code></li>
<li>Bitbucket: <code>#lines-</code></li>
</list>
</p>
<p>Default: <code>#L</code></p>
</def>
</deflist>
Expand Down
10 changes: 4 additions & 6 deletions docs/topics/runners/dokka-maven.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ To generate documentation for a Maven-based project, you can use the Maven plugi
> Compared to the [Gradle plugin for Dokka](dokka-gradle.md), the Maven plugin has only basic features and
> does not provide support for multi-module builds.
>
{type="note"}
{style="note"}

You can play around with Dokka and see how it can be configured for a Maven project by visiting
our [Maven example](https://github.com/Kotlin/dokka/tree/%dokkaVersion%/examples/maven) project.
Expand Down Expand Up @@ -133,7 +133,7 @@ mvn dokka:dokka jar:jar@dokka-jar
> from the `javadoc.jar`. It works well with the HTML format as demonstrated in
> [this example](https://javadoc.io/doc/com.trib3/server/latest/index.html).
>
{type="tip"}
{style="tip"}

## Configuration example

Expand Down Expand Up @@ -238,7 +238,7 @@ with [all configuration options](#complete-configuration) applied at the bottom
<def title="suppressObviousFunctions">
<p>Whether to suppress obvious functions.</p>
<p>
A function is considered to be obvious if it is:
A function is considered to be obvious if it is:</p>
<list>
<li>
Inherited from <code>kotlin.Any</code>, <code>Kotlin.Enum</code>, <code>java.lang.Object</code> or
Expand All @@ -249,7 +249,6 @@ with [all configuration options](#complete-configuration) applied at the bottom
<code>dataClass.componentN</code> or <code>dataClass.copy</code>.
</li>
</list>
</p>
<p>Default: <code>true</code></p>
</def>
<def title="suppressInheritedMembers">
Expand Down Expand Up @@ -443,13 +442,12 @@ function in `kotlinx.coroutines`.
to <code>#L</code> and the line number is 10, the resulting URL suffix is <code>#L10</code>.
</p>
<p>
Suffixes used by popular services:
Suffixes used by popular services:</p>
<list>
<li>GitHub: <code>#L</code></li>
<li>GitLab: <code>#L</code></li>
<li>Bitbucket: <code>#lines-</code></li>
</list>
</p>
</def>
</deflist>

Expand Down
13 changes: 13 additions & 0 deletions docs/writerside.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE ihp SYSTEM "https://resources.jetbrains.com/writerside/1.0/ihp.dtd">
<ihp version="2.0">
<module name="dokka"/>
<topics dir="topics"/>
<images dir="images"/>
<vars src="v.list"/>
<settings>
<default-property element-name="chapter" property-name="show-structure-depth" value="2"/>
<wrs-supernova use-version="242.21870"/>
</settings>
<instance src="dokka.tree" version="%dokkaVersion%"/>
</ihp>

0 comments on commit c9c52bd

Please sign in to comment.