Skip to content

Commit 4dae04a

Browse files
slusarzcmouse
authored andcommitted
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 2bf77d2 commit 4dae04a

File tree

8 files changed

+36
-67
lines changed

8 files changed

+36
-67
lines changed

.github/actions/spelling/expect.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -605,6 +605,7 @@ pidof
605605
pids
606606
Piljk
607607
pki
608+
plantuml
608609
popafter
609610
postconf
610611
postfixadmin
@@ -631,6 +632,7 @@ proctitle
631632
proofpoint
632633
proxymap
633634
pubout
635+
puml
634636
putscript
635637
pvo
636638
pwcheck
@@ -825,6 +827,7 @@ toolarge
825827
transitioning
826828
Troost
827829
tscript
830+
tsvg
828831
TTLs
829832
tuxfamily
830833
typedef
@@ -838,6 +841,7 @@ UIDPLUS
838841
uids
839842
uidv
840843
uidvalidity
844+
UML
841845
unaccessed
842846
unaliased
843847
unauth

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)