2. Create puml file in `docs\diagrams\src\`, e.g. `system_quick_overview.puml` with content:
@startuml
Bob -> Alice : hello
@enduml
3. Run build.
```bash
mkdocs build
INFO - Cleaning site directory
INFO - Building documentation to directory: /source
INFO - Number headings up to level 3.
INFO - Generate a table of contents up to heading level 2.
INFO - Generate a cover page with "default_cover.html.j2".
INFO - Converting <img> alignment(workaround).
ERROR - Failed to load image at "file:///source/catalog/diagrams/out/system_quick_overview.svg" (URLError: <urlopen error [Errno 2] No such file or directory: '/source/catalog/diagrams/out/system_quick_overview.svg'>)
INFO - Documentation built in 10.39 seconds
Converting /docs/diagrams/src/system_quick_overview.puml
ls -laR source/diagrams
./source/diagrams:
total 12
drwxr-xr-x 3 root root 4096 May 17 13:31 .
drwxr-xr-x 15 root root 4096 May 17 13:31 ..
drwxr-xr-x 2 root root 4096 May 17 13:31 src
./source/diagrams/src:
total 12
drwxr-xr-x 2 root root 4096 May 17 13:31 .
drwxr-xr-x 3 root root 4096 May 17 13:31 ..
-rw-r--r-- 1 root root 474 May 17 13:31 system_quick_overview.puml
NO Folder "out"
Nether folder, or files inside will be moved to source folder. But they exist in docs folder:
```bash
ls -laR /docs/diagrams
./docs/diagrams:
total 16
drwxrwxrwx 4 root root 4096 May 17 13:30 .
drwxrwxrwx 12 root root 4096 May 17 13:05 ..
drwxr-xr-x 2 root root 4096 May 17 13:30 out
drwxrwxrwx 2 root root 4096 May 17 13:05 src
./docs/diagrams/out:
total 16
drwxr-xr-x 2 root root 4096 May 17 13:30 .
drwxrwxrwx 4 root root 4096 May 17 13:30 ..
-rw-r--r-- 1 root root 6884 May 17 13:31 system_quick_overview.svg
./docs/diagrams/src:
total 12
drwxrwxrwx 2 root root 4096 May 17 13:05 .
drwxrwxrwx 4 root root 4096 May 17 13:30 ..
-rw-rw-rw- 1 root root 474 May 17 13:05 system_quick_overview.puml
Disable monorepo and run build. Test that it succeed.
mkdocs build
INFO - Cleaning site directory
INFO - Building documentation to directory: /source
INFO - Number headings up to level 3.
INFO - Generate a table of contents up to heading level 2.
INFO - Generate a cover page with "default_cover.html.j2".
INFO - Converting <img> alignment(workaround).
INFO - Documentation built in 20.54 seconds
Converting /docs/diagrams/src/system_quick_overview.puml
ls -la source/diagrams
./source/diagrams:
total 16
drwxr-xr-x 4 root root 4096 May 17 13:34 .
drwxr-xr-x 15 root root 4096 May 17 13:34 ..
drwxr-xr-x 2 root root 4096 May 17 13:34 out
drwxr-xr-x 2 root root 4096 May 17 13:34 src
./source/diagrams/out:
total 16
drwxr-xr-x 2 root root 4096 May 17 13:34 .
drwxr-xr-x 4 root root 4096 May 17 13:34 ..
-rw-r--r-- 1 root root 6884 May 17 13:34 system_quick_overview.svg #THIS IS A FILE
./source/diagrams/src:
total 12
drwxr-xr-x 2 root root 4096 May 17 13:34 .
drwxr-xr-x 4 root root 4096 May 17 13:34 ..
-rw-r--r-- 1 root root 474 May 17 13:34 system_quick_overview.puml
I can simulate in the first build, in my case the SVG is not added to the source/diagrams/out folder and no errors are printed in the console. But if I build it one more time, it works.
Dear all,
I find find out that plugin https://github.com/christo-ph/mkdocs_build_plantuml will not work correctly with monorepo. Problem is that generated SVG/PNG will not be moved to the source folder. Related ticket https://github.com/christo-ph/mkdocs_build_plantuml/issues/9
How to reproduce:
site_dir: source
plugins:
@startuml Bob -> Alice : hello @enduml
ls -laR source/diagrams ./source/diagrams: total 12 drwxr-xr-x 3 root root 4096 May 17 13:31 . drwxr-xr-x 15 root root 4096 May 17 13:31 .. drwxr-xr-x 2 root root 4096 May 17 13:31 src ./source/diagrams/src: total 12 drwxr-xr-x 2 root root 4096 May 17 13:31 . drwxr-xr-x 3 root root 4096 May 17 13:31 .. -rw-r--r-- 1 root root 474 May 17 13:31 system_quick_overview.puml
NO Folder "out"
ls -la source/diagrams ./source/diagrams: total 16 drwxr-xr-x 4 root root 4096 May 17 13:34 . drwxr-xr-x 15 root root 4096 May 17 13:34 .. drwxr-xr-x 2 root root 4096 May 17 13:34 out drwxr-xr-x 2 root root 4096 May 17 13:34 src ./source/diagrams/out: total 16 drwxr-xr-x 2 root root 4096 May 17 13:34 . drwxr-xr-x 4 root root 4096 May 17 13:34 .. -rw-r--r-- 1 root root 6884 May 17 13:34 system_quick_overview.svg #THIS IS A FILE ./source/diagrams/src: total 12 drwxr-xr-x 2 root root 4096 May 17 13:34 . drwxr-xr-x 4 root root 4096 May 17 13:34 .. -rw-r--r-- 1 root root 474 May 17 13:34 system_quick_overview.puml