Dokka plugin to render Mermaid graphics, from your code comments to your Dokka documentation.

Overview

Html Mermaid Dokka plugin

Mermaid-Dokka MermaidJS
0.2.2 8.14.0
0.3.0 9.0.0

Step 1: install

dependencies {
  dokkaPlugin("com.glureau:html-mermaid-dokka-plugin:0.3.0")
}

Step 2: write Mermaid graphs

You can write them on markdown files for modules/packages or directly from any comment in your code.

    /**
     * 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]
     * ```
     * another one
     * ```mermaid
gantt
    title A Gantt Diagram
    dateFormat  YYYY-MM-DD
    section Section
    A task           :a1, 2014-01-01, 30d
    Another task     :after a1  , 20d
    section Another
    Task in sec      :2014-01-12  , 12d
    another task      : 24d
    * ```
    */
class CompositeSubscription

Step 3: enjoy your Dokka documentation

./gradlew dokkaHtml or ./gradlew dokkaHtmlMultiModule ->

img.png

Theming & customization

By default, the Mermaid themes used are default and dark, but you can override themes globally with:

tasks.dokkaHtmlMultiModule {
    pluginsMapConfiguration.set(
        mapOf(
            "com.glureau.HtmlMermaidDokkaPlugin" to """
                {
                    "lightTheme": "forest",
                    "darkTheme": "dark"
                }
            """.trimIndent()
        )
    )
}

You can also specify the theme for each graph, with the %%{init: ...}%% block (documentation).

For example with %%{init: {'theme': 'base', 'themeVariables': { 'primaryColor': '#DD0000'}}}%%

%%{init: {'theme': 'base', 'themeVariables': { 'primaryColor': '#DD0000'}}}%%
graph TD
  A[Christmas] -->|Get money| B(Go shopping)
  B --> C{Let me think}
  B --> G[/Another/]
  C ==>|One| D[Laptop]
  C -->|Two| E[iPhone]
  C -->|Three| F[fa:fa-car Car]
  subgraph section
    C
    D
    E
    F
    G
  end
You might also like...

Websheetjs - Lightweight JS library to render website sections with data from Google Spreadsheets

websheet.js Render website sections with lazy-loaded data from Google Spreadsheets It's lightweight, fast, free and open-source ! See how it works, fu

Oct 4, 2022

Render readable & responsive tables in the terminal

terminal-columns Readable tables for the terminal. Tables can be automatically responsive! Features Content wrapped to fit column width Column widths

Oct 28, 2022

Given a list of items, only render what's visible on the screen while allowing scrolling the whole list.

Solid Windowed Given a list of items, only render what's visible on the screen while allowing scrolling the whole list. A Solid component. See https:/

Dec 21, 2022

Svelte component to render markdown.

svelte-exmarkdown Svelte component to render markdown. Motivation svelte-markdown is a good component package. However, it is not extensible. You cann

Jan 6, 2023

Engine render, fps and I/O on terminal.

typesgine-ascii - Game ASCII engine for terminal About | technologies | Features | Examples | Functions | License 📓 About Typesgine is engine for cre

Jun 10, 2022

Render (GitHub Flavoured with syntax highlighting) Markdown, and generate CSS for each of GitHub’s themes.

render-gfm Render (GitHub Flavoured with syntax highlighting) Markdown, and generate CSS for each of GitHub’s themes. GitHub Repository npm Package Do

Oct 10, 2022

Detect browser, and render view according to the detected browser type.

react-browser-detector Detect browser, and render view according to the detected browser type. Installation To install, you can use npm or yarn: npm i

Jul 13, 2022

Render arbitrary Markdown content in Astro, optionally integrating with any existing configuration.

Astro Markdown Astro Markdown lets you render arbitrary Markdown content in Astro, optionally integrating with any existing configuration. --- import

Dec 22, 2022

Render e-books in the browser

foliate-js Library for rendering e-books in the browser. Features: Supports EPUB, MOBI, KF8, FB2, CBZ Pure JavaScript Small and modular No dependencie

Dec 26, 2022
Releases(0.4.3)
Owner
Grégory Lureau
Grégory Lureau
🤖 GitHub Action which creates Issues from comments in your code

todo-issue[action] Disclosure Huge thanks to JasonEtco! After he decided to shut down his todo[bot] I've looked around for alternatives but decided to

Julian 17 Dec 11, 2022
A plugin for the Obsidian markdown note application, adding functionality to render markdown documents with multiple columns of text.

Multi-Column Markdown Take your boring markdown document and add some columns to it! With Multi Column Markdown rather than limiting your document lay

Cameron Robinson 91 Jan 2, 2023
Another table select prompt plugin of inquirer.js, with powerful table render and filters.

inquirer-table-select-prompt Table row selection prompt for Inquirer.js 动机 现有的 inquirer.js 没有支持表格行选中的命令行交互的插件. 社区内能查找到的,只有一个二维数组的 checkbox,eduardobouc

锂电 3 Jan 7, 2023
Cross-browser plugin to remove addictive features on YouTube like thumbnails, comments, previews and more...

ZenTube Installation Features Remove some (more) elements from Youtube to make it less addictive. Mix and match between the following options: Hide or

inversepolarity 57 Dec 17, 2022
Using Storybook for Pixi.js graphics development

Storybook for Pixi.js Using Storybook for Pixi.js graphics development This project includes: Storybook Pixi.js Pixi Viiewport Background Often conven

Jason Sturges 5 Mar 9, 2022
An indexed compendium of graphics programming papers, articles, blog posts, presentations, and more

Paper Bug CONTRIBUTIONS WANTED What is this? The idea is to have an annotated and easily searchable repository of papers, presentations, articles, etc

Jeremy Ong 64 Dec 16, 2022
A first person character controller for the Three.js graphics library

charactercontroller A first person character controller for the Three.js graphics library Demo Installation npm install charactercontroller Usage impo

Malted 10 Aug 17, 2022
BonsaiJS is a graphics library and renderer

Bonsai (previously known as bikeshedjs) The art of bonsai tells a story through living illusion. A bonsai artist searches for ways to express his pers

uxebu 2k Dec 21, 2022
A TypeScript implementation of High-Performance Polynomial Root Finding for Graphics (Yuksel 2022)

Nomial Nomial is a TypeScript implementation of Cem Yuksel's extremely fast, robust, and simple root finding algorithm presented in the paper "High-Pe

Peter Boyer 10 Aug 3, 2022
Portfolio page using React.js to render dynamic HTML

Meta-Portfolio Portfolio page using React.js to render dynamic HTML Version 1.0 Note You are important. Installation Instructions No installation nece

Andrew Tran 0 May 17, 2022