Skip to content

Commit 96addd9

Browse files
committed
plantuml: Generate images manually so we are serving static data
Unfortunately, all the VitePress PlantUML plugins either display the data by sending to a remote server (plantuml.com), or require Java and the PlantUML JAR to be installed locally. To keep installation and development of the documentation straightforward, for now require that PlantUML graphics be generated manually. This shouldn't be needed to be done often - and the process to generate is easy if Docker is available.
1 parent ab84924 commit 96addd9

File tree

7 files changed

+32
-67
lines changed

7 files changed

+32
-67
lines changed

assets/plantuml/README.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# PlantUML Data
2+
3+
This directory contains PlantUML files that are used to create diagrams for
4+
the documentation.
5+
6+
## Docker
7+
8+
[PlantUML](https://plantuml.com/) files are converted to SVG by using a Java
9+
program.
10+
11+
It is easiest to run the program by using a pre-configured Docker container.
12+
13+
The output command is as follows:
14+
15+
```
16+
docker run --rm -v /path/to/your/puml/files:/data \
17+
-v /path/to/your/output/directory:/output plantuml/plantuml \
18+
-tsvg /data/your_diagram.puml \
19+
-o /output
20+
```
21+
22+
For example, if running from this directory to convert foo.puml, and storing
23+
the SVG file in the "docs/core/images" directory (so it can be referenced via
24+
Markdown from within VitePress), run:
25+
26+
```
27+
mkdir -p ../../docs/core/images
28+
docker run --rm -v ./:/data -v ../../docs/core/images:/output \
29+
plantuml/plantuml -tsvg /data/foo.puml -o /output
30+
```
Lines changed: 1 addition & 0 deletions
Loading

docs/core/config/submission.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ service:
8484

8585
## Flow Diagram
8686

87-
<!-- @include: @docs/core/config/include/submission_flow.inc -->
87+
![Submission Flow Diagram](/docs/core/config/images/submission_flow.svg)
8888

8989
## Configuration
9090

lib/markdown.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import containerPlugin from 'markdown-it-container'
22
import fg from 'fast-glob'
33
import deflistPlugin from 'markdown-it-deflist'
4-
import { plantuml } from "@mdit/plugin-plantuml";
54
import path from 'path'
65
import { createMarkdownRenderer } from 'vitepress'
76
import { dovecotSetting, frontmatterIter, loadData } from './utility.js'
@@ -18,7 +17,6 @@ export function dovecotMdExtend(md) {
1817
})
1918
md.use(deflistPlugin)
2019
md.use(dovecot_markdown)
21-
md.use(plantuml)
2220

2321
return md
2422
}

package-lock.json

Lines changed: 0 additions & 63 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
{
22
"name": "dovecot-ce-documentation",
33
"devDependencies": {
4-
"@mdit/plugin-plantuml": "^0.22.3",
54
"@sindresorhus/slugify": "^2.2.1",
65
"camelcase": "^8.0.0",
76
"commander": "^13.1.0",

0 commit comments

Comments
 (0)