LoginSignup
3
1

More than 5 years have passed since last update.

VuePressでPlantUMLを使う

Posted at

VuePressのMarkdownに、PlantUMLで書いた図を挿入します。
VuePressはmarkdown-itを使っているので、markdown-it用のプラグインが自由に使えるようです。

markdown-itには、PlantUMLのプラグインがあります。
そちらをVuePressに組み込みます。

まず依存を追加。

$ yarn add -D markdown-it-plantuml

続いてVuePressに組み込み。

config.js
module.exports = {
    ...
    markdown: {
        config: md => {
            md.use(require('markdown-it-plantuml'))
        }
    }
}

Markdown中で以下のように使えます。

@startuml
actor User
component hello
User -> hello: USERNAME
@enduml

スクリーンショット 2018-09-09 16.09.29.png

導入にあたって行った変更は以下:

3
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
1