Skip to content

Commit

Permalink
Merge pull request #343 from davejm/new-features
Browse files Browse the repository at this point in the history
Allow setting diagram size, theme and add PDF output support. Fix som…
  • Loading branch information
jihchi committed Apr 24, 2024
2 parents a7b5265 + 9939dd6 commit 285005d
Show file tree
Hide file tree
Showing 18 changed files with 1,146 additions and 73 deletions.
2 changes: 1 addition & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
!package.json
!pnpm-lock.yaml
!src/*
|LICENCE
!LICENCE
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ RUN usermod -a -G audio,video node \
&& chown -R node:node /home/node /usr/src/app/

USER node
RUN corepack pack
CMD ["pnpm", "start"]

EXPOSE 3000
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,14 @@ wget https://raw.githubusercontent.com/jfrazelle/dotfiles/master/etc/docker/secc
docker run --security-opt seccomp=$(pwd)/chrome.json ghcr.io/jihchi/mermaid.ink
```

### Environment variables

| variable name | default value | description |
| -- | -- | -- |
| `MAX_WIDTH` | `10000` | Determine the maximum scaled diagram width that can be requested |
| `MAX_HEIGHT` | `10000` | Determine the maximum scaled diagram height that can be requested |
| `FONT_AWESOME_CSS_URL` | `<unset>` | Sets a custom URL for the injected font-awesome CSS in the SVG. <br><br> The string `FA_VERSION` will be replaced with the version of font-awesome in use by the application e.g., `https://cdnjs.cloudflare.com/ajax/libs/font-awesome/FA_VERSION/css/all.min.css`. |

## Troubleshooting

### I'm getting back `HTTP 431 Request Header Fields Too Large` error
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@
"@happy-dom/jest-environment": "^14.3.6",
"@testing-library/jest-dom": "^6.0.0",
"jest": "^29.6.2",
"pdf-lib": "^1.17.1",
"prettier": "^3.0.1",
"sharp": "^0.33.3",
"supertest": "^6.3.3"
},
"packageManager": "pnpm@8.15.4",
Expand Down

0 comments on commit 285005d

Please sign in to comment.