Skip to content
프로젝트

joethei/obsidian-plantuml

GitHub에서 보기

소개

Obsidian.md에서 PlantUML 다이어그램 생성

디자인 및 미디어

이 수치를 측정하는 방법

측정된 스타 증가

in 24h
0
in 7 days
+1
in 15 days
+1
in 1 month
기록 수집 중

서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.

README.md

Original

PlantUML Support for Obsidian

libera manifesto

Render PlantUML Diagrams in Obsidian


Demonstration

This plugin uses either the PlantUML Online Server, or a local .jar file for rendering.

You can also host your own server (Docker / JEE / PicoWeb) and specify its address in the settings.

Please note that using the local rendering method is not as performant as using a server.

Usage

Create a fenced codeblock using plantuml as the language. Specify your plantuml code inside. To generate a diagram with higher resolution use plantuml-svg

You can also use plantuml-ascii to generate ASCII Art.

Documentation on Plantuml can be found on plantuml.com

Linking to notes in vault

Since the syntax for weblinks in PlantUML is the same for as for Wikilinks in Obsidian, a special syntax is used: [[[Your other note]]] For the content of such a link refer to the obisidian documentation.

Normal web links are described here

Captions

Turn on Captions below diagrams in the settings to show captions below diagrams like image captions, instead of inside the image.

The PlantUML caption of a diagram is then shown below it, \n starts a new line:

```plantuml
caption Figure 1: Login flow
Bob -> Alice : hello
```

Embedded .puml files show their display text as caption instead: ![[diagram.puml|Figure 1: Login flow]]

Only plain text captions are moved below the diagram. Captions with formatting, links or preprocessor variables, and captions inside blocks or !if branches stay inside the image. The caption is styled with the .puml-caption class. Exported and copied diagrams don't contain it.

Including an .puml file

⚠️ Only works when using local rendering

This works just as describe in the official documentation.

Examples

```plantuml
Bob -> Alice : hello
Alice -> Wonderland: hello
Wonderland -> next: hello
next -> Last: hello
Last -> next: hello
next -> Wonderland : hello
Wonderland -> Alice : hello
Alice -> Bob: hello
```

results in:

```plantuml-ascii
Bob -> Alice : hello
Alice -> Wonderland: hello
Wonderland -> next: hello
next -> Last: hello
Last -> next: hello
next -> Wonderland : hello
Wonderland -> Alice : hello
Alice -> Bob: hello
```

results in:

     ┌───┐          ┌─────┐          ┌──────────┐          ┌────┐          ┌────┐
     │Bob│          │Alice│          │Wonderland│          │next│          │Last│
     └─┬─┘          └──┬──┘          └────┬─────┘          └─┬──┘          └─┬──┘
       │    hello      │                  │                  │               │   
       │──────────────>│                  │                  │               │   
       │               │                  │                  │               │   
       │               │      hello       │                  │               │   
       │               │─────────────────>│                  │               │   
       │               │                  │                  │               │   
       │               │                  │       hello      │               │   
       │               │                  │ ─────────────────>               │   
       │               │                  │                  │               │   
       │               │                  │                  │     hello     │   
       │               │                  │                  │ ──────────────>   
       │               │                  │                  │               │   
       │               │                  │                  │     hello     │   
       │               │                  │                  │ <──────────────   
       │               │                  │                  │               │   
       │               │                  │       hello      │               │   
       │               │                  │ <─────────────────               │   
       │               │                  │                  │               │   
       │               │      hello       │                  │               │   
       │               │<─────────────────│                  │               │   
       │               │                  │                  │               │   
       │    hello      │                  │                  │               │   
       │<──────────────│                  │                  │               │   
     ┌─┴─┐          ┌──┴──┐          ┌────┴─────┐          ┌─┴──┐          ┌─┴──┐
     │Bob│          │Alice│          │Wonderland│          │next│          │Last│
     └───┘          └─────┘          └──────────┘          └────┘          └────┘

Known issues

Not all methods of using PlantUML support all different diagrams. Following are a few known issues.

  • ASCII can only ever generate Sequence diagrams
  • The PicoWeb server does not support clickable links in png diagrams
  • Some languages like chinese are not rendered correctly -> Switch to SVG rendering

Installation

Settings > Community plugins > Community Plugins > Browse and search for PlantUML.

관련 프로젝트 살펴보기

불러오는 중…