Skip to content

Commit

Permalink
explain the use of drawio to edit and publish diagrams
Browse files Browse the repository at this point in the history
- where to store the original and svg final version
- installing drawio and aliasing the binary
- how to generate an SVG version of the diagram
  • Loading branch information
pauldougan committed Mar 27, 2024
1 parent e04a5fc commit 94c9b9b
Showing 1 changed file with 37 additions and 1 deletion.
38 changes: 37 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,42 @@ Images to be included in the docs are kept in `source/images`

In order to configure some aspects of layout, like the header, edit `config/tech-docs.yml`.

## Making changes to a diagram
To make changes to a diagram, you'll need to edit the `drawio` files in `source/images/originals` using the draw.io desktop app.

Use one drawio file per diagram.

### Install draw.io desktop app
1. Install the draw.io desktop app using Homebrew with the following command:

```
brew cask install drawio
```

2. Alias the binary so that you can just type `draw.io` at the command line. Use the following command to do this:
```
alias=draw.io='/Applications/draw.io.app/Contents/MacOS/draw.io'
```

### Edit and publish the diagram
Follow these steps:
1. Create and modify the diagram using [draw.io](https://about.draw.io/).
1. Store the draw.io original file in `source/images/originals`.
1. Publish the diagram as a [scalable vector graphic (SVG)](https://www.w3.org/Graphics/SVG/).
1. Store the SVG in the `source/images` folder.

### Useful commands
Update a diagram:
```
draw.io source/images/originals/top-level-technical-diagram.drawio
```
Generate SVG versions of the diagrams:
```
draw.io -x -o source/images/top-level-technical-diagram.svg source/images/originals/top-level-technical-diagram.drawio
draw.io -x -o source/images/technical-flow-diagram.svg source/images/originals/technical-flow-diagram.drawio
```


### Workflow

The repository uses Github actions.
Expand Down Expand Up @@ -145,4 +181,4 @@ The documentation is [© Crown copyright][copyright] and available under the ter

[mit]: LICENCE.md
[copyright]: http://www.nationalarchives.gov.uk/information-management/re-using-public-sector-information/uk-government-licensing-framework/crown-copyright/
[ogl]: http://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/
[ogl]: http://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/

0 comments on commit 94c9b9b

Please sign in to comment.