Container base on jekyll/jekyll container.
- JEKYLL_VERSION: 4.2.2
- PLANTUML_VERSION: 1.2023.4
- PLANTUML_TAG: v1.2023.4
-
Install docker
-
Create a
compose.yml
fileversion: "3.8" services: jekyll: image: ghcr.io/plantuml/docker/jekyll:latest container_name: jekyll environment: JEKYLL_SITE_NAME: myPlantUmlBlog ports: - "4000:4000" volumes: - "./site:/srv/jekyll" command: "jekyll-build-and-serve.sh"
-
Run docker compose
docker compose up
- configure the jekyll-plantuml plugin
Edit _config.yml
plugins:
- jekyll-feed
- jekyll-plantuml
plantuml:
plantuml_jar: _bin/plantuml.jar # path to plantuml jar
tmp_folder: _plantuml # tmp folder to put generated image files
dot_exe: /usr/bin/dot # [optional] path to Graphviz dot execution
background_color: white # [optional] UML image background color
Add some plantuml diagrams in your posts:
{% plantuml %}
@startuml
Alice -> Bob: Authentication Request
Bob --> Alice: Authentication Response
Alice -> Bob: Another authentication Request
Alice <-- Bob: another authentication Response
@enduml
{% endplantuml %}
Enjoy 🥳
gh repo clone plantuml/docker
cd docker/jekyll
Note: We will mount this directory and create jekyll's site under it.
mkdir site
-
Build the container
make build
-
Run tests to validate that the container is working as expected
make test
-
Create a site. By default, the site will be named "myBlog". You can use the variable
$JEKYLL_SITE_NAME
to create an other site. This will create amyBlog
jekyll site under thesite
directory.make site #or for a custom site #JEKYLL_SITE_NAME=myCustomSite make site
-
Run the server locally
make serve #or for a custom site #JEKYLL_SITE_NAME=myCustomSite make serve
open http://localhost:4000/ in your browser
You can use make enter
to run a bash shell inside the container.