Il y avait quelques articles d'introduction sur Honkit, mais je n'ai pas trouvé beaucoup d'articles sur la mise à disposition de PlantUml.
Code qui fonctionne 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
#Installation supplémentaire pour 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
Après cela, le travail sera effectué dans le conteneur, sauf indication contraire.
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:4000
Dans plantuml.
Recommended Posts