This release delivers several long-awaited features. Looking back at whatβs been accomplished, itβs surprising that it took nearly two years to finally bring it all together. However, it's here and we invite everyone to try the new version :fire: .
π What's New?
Themes
We've added full support for automatic light / dark theming of diagrams that works not only with [plantuml.com](http://plantuml.com) server but with all PlantUML servers. You can choose a theme for each mode by adding the following lines to the `mkdocs.yml`
yaml
theme:
light: default/light
dark: default/dark
You can combine different themes together
yaml
theme:
light: default/light
dark: catppuccin/mocha
By default `mkdocs_puml` searches for themes in its github repository but you can setup your own server or repository for your custom themes.
Themes Repository
`mkdocs_puml` now includes its own repository of themes. For version `2.0.0`, we have prepared two themes
* [default](https://github.com/MikhailKravets/mkdocs_puml/blob/master/themes/default/README.md) β a default PlantUML theme for diagrams **+** enhanced dark mode for C4;
* [catppuccin](https://github.com/MikhailKravets/mkdocs_puml/blob/master/themes/catppuccin/README.md) β an implementation of famous [catppuccin](https://catppuccin.com) theme for PlantUML.
π¨ [**Read more about mkdocs_puml themes**](https://github.com/MikhailKravets/mkdocs_puml/tree/master/themes)
Storage and Cache
You don't need to re-render diagrams that are already fine. You only need to render those that have been changed.
Now, `mkdocs_puml` persists the diagrams in the file and requests PlantUML server only with the ones that were
modified by user. This significantly reduces the documentation build time.
You can manage the storage behavior by modifying `cache` parameter
yaml
cache:
backend: local
local:
path: "~/.cache/mkdocs_puml"
Alternatively, you can disable caching entirely
yaml
cache:
backend: disabled
This will keep the diagrams in RAM only.
Asynchronous HTTP requests
In this release we have removed `ThreadPoolExecutor`. Now, we request a server asynchronously, allowing all requests to run concurrently. So, roughly speaking, a user is constrained only by a throughput of PlantUML server.
Rich terminal output
A small but pleasant feature: weβve added a nice terminal output that displays the current status of `mkdocs_puml`.
The output is enabled by default but can be disabled simply by
yaml
verbose: false
Interactive diagrams
We added interaction to diagrams.
![](https://github.com/MikhailKravets/mkdocs_puml/blob/master/.docs/examples/interaction.gif)
Now, you can move and zoom diagrams. Also, you can copy `svg` code to clipboard.