There were some introductory articles about Honkit, but I didn't find many articles about making PlantUml available.
Code that works https://github.com/tktcorporation/honkit-uml-sample
package.json
{
  "name": "honkit_docker",
  "version": "1.0.0",
  "scripts": {
    "serve": "npx honkit serve",
    "build": "npx honkit build",
    "pdf": "npx honkit pdf"
  },
  "dependencies": {
    "gitbook-plugin-uml": "^1.0.3",
    "honkit": "^3.6.6"
  }
}
Dockerfile
FROM honkit/honkit
RUN apt-get update
#Additional installation for PlantUml
RUN apt-get install -y build-essential openjdk-8-jre graphviz
WORKDIR /doc
COPY ./package.json ./package.json
RUN yarn
COPY . .
CMD [ "npx honkit build" ]
docker-compose.yml
version: "3.7"
services:
  doc:
    build: .
    restart: always
    working_dir: /doc
    volumes:
      - .:/doc:cached
      - /doc/node_modules
    ports:
      - "4000:4000"
$ docker-compose build
$ docker-compose run --service-ports doc /bin/bash
After that, the work will be done in the container unless otherwise specified.
book.json
{
  "plugins": [
    "uml"
  ]
}
init
$ honkit init
# UML Sample
```uml
@startuml
actor Promoter
actor Entrant
Promoter --> (Create Event)
Promoter -> (Attend Event)
Entrant --> (Find Event)
(Attend Event) <- Entrant
(Attend Event) <.. (Create Member)  : <<include>>
@enduml
$ npx honkit serve
localhost:4000In plantuml.
Recommended Posts