Skip to content

Commit 6db9224

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 6db9224

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
@@ -601,6 +601,7 @@ pidof
601601
pids
602602
Piljk
603603
pki
604+
plantuml
604605
popafter
605606
postconf
606607
postfixadmin
@@ -627,6 +628,7 @@ proctitle
627628
proofpoint
628629
proxymap
629630
pubout
631+
puml
630632
putscript
631633
pvo
632634
pwcheck
@@ -821,6 +823,7 @@ toolarge
821823
transitioning
822824
Troost
823825
tscript
826+
tsvg
824827
TTLs
825828
tuxfamily
826829
typedef
@@ -834,6 +837,7 @@ UIDPLUS
834837
uids
835838
uidv
836839
uidvalidity
840+
UML
837841
unaccessed
838842
unaliased
839843
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)