diff --git a/docs/src/doc/docs/community/plugins-list.md b/docs/src/doc/docs/community/plugins-list.md index dc88ade3cb..8a01a6845d 100644 --- a/docs/src/doc/docs/community/plugins-list.md +++ b/docs/src/doc/docs/community/plugins-list.md @@ -1,6 +1,12 @@ # Dokka community plugins -TODO add a link on how to apply plugins +On this page you can find `Dokka` plugins which are supported by both `Dokka` maintainers and community members. + +If you want to add your plugin to this list, get in touch with maintainers via [Slack](../community/slack.md) +or `GitHub`. + +If you want to learn how to develop plugins for `Dokka`, see +[Plugin development](../developer_guide/plugin-development/introduction.md) section. ## Output Formats @@ -8,7 +14,7 @@ TODO add a link on how to apply plugins Javadoc plugin adds a `Javadoc` output format that looks like Java's `Javadoc`, but it's for the most part a lookalike, so you may experience problems if you try to use it with a tool that expects native -`Javadocs` generated by `Java`. +`Javadoc` documentation generated by `Java`. `Javadoc` plugin does not support multiplatform projects and does not have a multi-module task. @@ -26,7 +32,7 @@ a lookalike, so you may experience problems if you try to use it with a tool tha ### GFM (Alpha) -`GFM` plugins adds an ability to generate documentation in `GitHub flavoured Markdown` format. Supports both +`GFM` plugins adds the ability to generate documentation in `GitHub flavoured Markdown` format. Supports both multimodule and multiplatform projects, and is shipped together with `Dokka`, so you can start using it right away with one of the following tasks: @@ -40,26 +46,26 @@ ___ //[dokka-debug-kts](#gfm)/[org.jetbrains.dokka.test](#gfm)/[MyClass](#gfm) -# MyClass +#### MyClass [jvm] class [MyClass](#gfm) KDoc that describes this class -## Constructors +##### Constructors | | | |---|---| | [MyClass](#gfm) | [jvm]
fun [MyClass](#gfm)() | -## Functions +##### Functions | Name | Summary | |------------------|---| | [function](#gfm) | [jvm]
fun [function](#gfm)(): [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)
KDoc comment on top of this function | -## Properties +##### Properties | Name | Summary | |---|------------------------------------------------------------------------------------------------------------------------------------------------| @@ -74,7 +80,7 @@ ___ ### Jekyll (Alpha) -`Jekyll` plugins adds an ability to generate documentation in `Jekyll flavoured Markdown` format. Supports both +`Jekyll` plugins adds the ability to generate documentation in `Jekyll flavoured Markdown` format. Supports both multi-module and multiplatform projects, and is shipped together with `Dokka`, so you can start using it right away with one of the following tasks: @@ -91,18 +97,18 @@ right away with one of the following tasks: ### Mathjax -[MathJax](https://docs.mathjax.org/) allows you to include mathematics in your web pages. `Dokka` `MathJax` plugin -adds an ability to render mathematics from source code comments. +[MathJax](https://docs.mathjax.org/) allows you to include mathematics in your web pages. `MathJax` plugin +adds the ability to render mathematics from source code comments. -If `MathJax` plugin encounters `@usesMathJax` `KDoc` tag, it adds `MathJax.js` 2.7.6 with `config=TeX-AMS_SVG` +If `MathJax` plugin encounters `@usesMathJax` `KDoc` tag, it adds `MathJax.js` (ver. 2) with `config=TeX-AMS_SVG` to generated `HTML` pages. Usage example: ```kotlin /** - * @usesMathJax - * * Some math \(\sqrt{3x-1}+(1+x)^2\) + * + * @usesMathJax */ class Foo {} ``` @@ -118,6 +124,26 @@ Which results in: [Mermaid JS](https://mermaid-js.github.io/mermaid/#/) lets you create diagrams and visualizations using text and code. `Mermaid` plugin allows rendering such diagrams and visualizations found in source code documentation. +Usage example: +```kotlin +/** + * See the graph for more details: + * \```mermaid + * graph LR + * A[Christmas] -->|Get money| B(Go shopping) + * B --> C{Let me think} + * C -->|One| D[Laptop] + * C -->|Two| E[iPhone] + * C -->|Three| F[fa:fa-car Car] + * \``` + */ +class CompositeSubscription +``` + +Which results in: + +![Mermaid demo](../images/mermaid_demo.png){ width="700" } + For more information and examples, see [Html Mermaid Dokka plugin](https://github.com/glureau/dokka-mermaid) repository on GitHub. diff --git a/docs/src/doc/docs/community/slack.md b/docs/src/doc/docs/community/slack.md index 98716523f9..290d4a180e 100644 --- a/docs/src/doc/docs/community/slack.md +++ b/docs/src/doc/docs/community/slack.md @@ -1,7 +1,7 @@ # Slack channel -Dokka has a dedicated `#dokka` channel in the Kotlin Community Slack, where you can ask questions and chat -about using, customizing or contributing to Dokka. +`Dokka` has a dedicated `#dokka` channel in the `Kotlin Community Slack`, where you can ask questions and chat +about using, customizing or contributing to `Dokka`. [Follow the instructions](https://surveys.jetbrains.com/s3/kotlin-slack-sign-up) to get an invite or [connect directly](https://kotlinlang.slack.com). diff --git a/docs/src/doc/docs/developer_guide/architecture/architecture_overview.md b/docs/src/doc/docs/developer_guide/architecture/architecture_overview.md index 17bd7568b8..54ca9d331d 100644 --- a/docs/src/doc/docs/developer_guide/architecture/architecture_overview.md +++ b/docs/src/doc/docs/developer_guide/architecture/architecture_overview.md @@ -1,21 +1,23 @@ # Architecture overview -Normally, you would think that a tool like Dokka simply parses some programming language sources and generates +Normally, you would think that a tool like `Dokka` simply parses some programming language sources and generates `HTML` pages for whatever it sees along the way, with little to no abstractions. That would be the simplest and shortest way to implement a documentation engine. -However, it was clear that Dokka may need to generate documentation from various sources (not only `Kotlin`), that users +However, it was clear that `Dokka` may need to generate documentation from various sources (not only `Kotlin`), that users might request additional output formats (like `Markdown`), that users might need additional features like supporting -custom KDoc tags or rendering `mermaid.js` diagrams - all these things would require changing a lot of code inside -Dokka itself if all solutions were hardcoded. +custom `KDoc` tags or rendering `mermaid.js` diagrams - all these things would require changing a lot of code inside +`Dokka` itself if all solutions were hardcoded. -For this reason, Dokka was built from the ground up to be extensible and customizable. You can think of the general -flow of generating documentation with Dokka as mapping one intermediate representation / abstraction into another. -You, as a Dokka developer or a plugin writer, can use extension points and introduce selective changes to the -model on any level without touching everything else. +For this reason, `Dokka` was built from the ground up to be extensible and customizable. You can think of the general +flow of generating documentation with `Dokka` as mapping one intermediate representation / abstraction into another. +You, as a `Dokka` developer or a plugin writer, can use extension points and introduce selective changes to the +model on one particular level without touching the rest. ## Overview of data model +Below you can find the general flow and transformation of Dokka's models. + ```mermaid flowchart TD Input --> Documentables --> Documentables --> Pages --> Pages --> Output @@ -25,9 +27,13 @@ flowchart TD * `Documentables` - unified data model that represents any parsed sources as a tree. Examples: class/function/package/property * `Pages` - universal model that represents pages (e.g a function/property page) and its content - (lists, text, code blocks) that the users needs to see -* `Output` - specific output format like `HTML`/`Markdown`/`Javadoc`/etc. This is a mapping of content to + (lists, text, code blocks) that the users needs to see. Not to be confused with `.html` pages. Goes hand in hand + with so-called Content Model. +* `Output` - specific output format like `HTML`/`Markdown`/`Javadoc`/etc. This is a mapping of pages/content model to some human-readable and visual representation. For instance: + * `PageNode` is mapped as + * `.html` file for `HTML` format + * `.md` file for `Markdown` format * `ContentList` is mapped as * `
  • ` / `